Attachment 'moin153-usernamespace.patch'
Download 1 diff -u -r moin-1.5.3-orig/MoinMoin/action/MyPages.py moin-1.5.3/MoinMoin/action/MyPages.py
2 --- moin-1.5.3-orig/MoinMoin/action/MyPages.py 2006-04-15 17:13:22.000000000 -0400
3 +++ moin-1.5.3/MoinMoin/action/MyPages.py 2006-05-08 15:14:41.000000000 -0400
4 @@ -29,8 +29,12 @@
5 wikiurl = wikiutil.mapURL(request, wikiurl)
6 homepageurl = wikiutil.join_wiki(wikiurl, wikitail)
7 request.http_redirect('%s?action=MyPages' % homepageurl)
8 -
9 - homepage = Page(request, username)
10 +
11 + homepagename = username
12 + if request.cfg.user_namespace:
13 + homepagename = request.cfg.user_namespace + username
14 +
15 + homepage = Page(request, homepagename)
16 if not homepage.exists():
17 return homepage.send_page(request,
18 msg = _('Please first create a homepage before creating additional pages.'))
19 @@ -48,9 +52,9 @@
20 the group pages.
21
22 ||'''Add a new personal page:'''||'''Related access control list group:'''||
23 -||[[NewPage(HomepageReadWritePageTemplate,read-write page,%(username)s)]]||["%(username)s/ReadWriteGroup"]||
24 -||[[NewPage(HomepageReadPageTemplate,read-only page,%(username)s)]]||["%(username)s/ReadGroup"]||
25 -||[[NewPage(HomepagePrivatePageTemplate,private page,%(username)s)]]||%(username)s only||
26 +||[[NewPage(HomepageReadWritePageTemplate,read-write page,%(homepagename)s)]]||["%(homepagename)s/ReadWriteGroup"]||
27 +||[[NewPage(HomepageReadPageTemplate,read-only page,%(homepagename)s)]]||["%(homepagename)s/ReadGroup"]||
28 +||[[NewPage(HomepagePrivatePageTemplate,private page,%(homepagename)s)]]||["%(homepagename)s"] only||
29
30 """, formatted=False)
31 pagecontent = pagecontent % locals()
32 diff -u -r moin-1.5.3-orig/MoinMoin/multiconfig.py moin-1.5.3/MoinMoin/multiconfig.py
33 --- moin-1.5.3-orig/MoinMoin/multiconfig.py 2006-04-07 14:22:01.000000000 -0400
34 +++ moin-1.5.3/MoinMoin/multiconfig.py 2006-05-08 15:14:25.000000000 -0400
35 @@ -439,6 +439,7 @@
36 user_transient_fields = ['id', 'valid', 'may', 'auth_username', 'trusted', 'password', 'password2', 'auth_method', 'auth_attribs']
37
38 user_homewiki = 'Self' # interwiki name for where user homepages are located
39 + user_namespace = '' # Prefix for all user homepages, such as "User/"
40
41 unzip_single_file_size = 2.0 * 1000**2
42 unzip_attachments_space = 200.0 * 1000**2
43 diff -u -r moin-1.5.3-orig/MoinMoin/wikiutil.py moin-1.5.3/MoinMoin/wikiutil.py
44 --- moin-1.5.3-orig/MoinMoin/wikiutil.py 2006-04-09 08:59:40.000000000 -0400
45 +++ moin-1.5.3/MoinMoin/wikiutil.py 2006-05-08 15:14:17.000000000 -0400
46 @@ -731,6 +731,9 @@
47 if not username:
48 return None # anon user
49
50 + if request.cfg.user_namespace:
51 + username = request.cfg.user_namespace + username
52 +
53 homewiki = request.cfg.user_homewiki
54 if homewiki == request.cfg.interwikiname:
55 homewiki = 'Self'
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.