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.You are not allowed to attach a file to this page.