Attachment 'MakeInvitation.py'

Download

   1 # -*- coding: iso-8859-1 -*-
   2 """
   3     MoinMoin - Make Invitation Macro
   4 
   5     This macro helps admins in creating accounts for new users
   6     and send out invitation with the login data to to join the
   7     wiki community.
   8     You have to be superuser to be able to call this macro,
   9 
  10     To get this macro work, patching user.py and userform.py
  11     is required. See http://moinmoin.wikiwikiweb.de
  12 
  13     There you can also find some page template for a new underlay
  14     page "MakeInvitation". Please set the acl accordingly so that
  15     only superuser are able to read this page.
  16 
  17     For full multilang support, translation for the phrase
  18     "User account created." must be provided as well as translations
  19     of the new underlay page MakeInvitation. Also translations for
  20     the new email text in userform.py is needed.
  21     
  22     @copyright: 2006 by Oliver Siemoneit
  23     @license: GNU GPL, see COPYING for details.
  24 """
  25 
  26 
  27 from MoinMoin.widget import html
  28 from MoinMoin import userform
  29 
  30 
  31 def execute(macro, args):
  32     request = macro.request
  33     _ = request.getText
  34     formatter = macro.formatter
  35 
  36     # Check if user is superuser. If not: return with error msg
  37     if not request.user.isSuperUser():
  38         err = _('You are not allowed to perform this action.')
  39         return "%s%s%s" % (formatter.sysmsg(1), formatter.text(err), formatter.sysmsg(0))
  40 
  41     data = userform.getUserForm(request, True)
  42     return data

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2006-11-25 20:10:35, 1.4 KB) [[attachment:MakeInvitation.py]]
  • [get | view] (2006-12-10 22:20:31, 1.1 KB) [[attachment:MakeInvitation.txt]]
  • [get | view] (2006-12-10 22:20:06, 2.8 KB) [[attachment:MakeInvitation1-6-dev.py]]
  • [get | view] (2008-11-20 08:40:46, 9.3 KB) [[attachment:MakeInvitation_v1.7.2.gif]]
  • [get | view] (2008-11-20 07:33:50, 3.0 KB) [[attachment:MakeInvitation_v1.7.2.py]]
  • [get | view] (2008-11-20 07:34:07, 1.2 KB) [[attachment:MakeInvitation_v1.7.2.txt]]
  • [get | view] (2006-12-10 22:19:33, 2.5 KB) [[attachment:mailAccountData.py]]
  • [get | view] (2006-11-25 20:10:53, 2.3 KB) [[attachment:moin1-5-4-1user.diff]]
  • [get | view] (2006-11-25 20:13:16, 4.1 KB) [[attachment:moin1-5-4-1userform.diff]]
  • [get | view] (2006-12-10 22:19:03, 2.2 KB) [[attachment:user-1-6-dev.diff]]
  • [get | view] (2006-11-25 20:12:10, 33.3 KB) [[attachment:user_moin1-5-4-1_patched.py]]
  • [get | view] (2006-12-10 22:18:31, 1.0 KB) [[attachment:userform.diff]]
  • [get | view] (2006-11-25 20:12:52, 31.5 KB) [[attachment:userform_moin1-5-4-1_patched.py]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.