changeset 5310:1f0c87a833a8

action.edit: bug fix for MoinMoinBugs/MissingPageShouldn'tOfferToCreatePageForReadonlyUsers
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sat, 28 Nov 2009 00:31:03 +0100
parents da5a971ef2de
children a1215ba14417
files MoinMoin/action/edit.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/edit.py	Sun Nov 22 23:57:38 2009 +0100
+++ b/MoinMoin/action/edit.py	Sat Nov 28 00:31:03 2009 +0100
@@ -22,8 +22,10 @@
         return
 
     if not request.user.may.write(pagename):
-        request.theme.add_msg(_('You are not allowed to edit this page.'), "error")
-        Page(request, pagename).send_page()
+        page = wikiutil.getLocalizedPage(request, 'PermissionDeniedPage')
+        page.body = _('You are not allowed to edit this page.')
+        page.page_name = pagename
+        page.send_page(send_special=True)
         return
 
     valideditors = ['text', 'gui', ]