changeset 1896:1de612a8c553

PageEditor: CopyPage bug fixed check write rights
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 18 Mar 2007 22:32:39 +0100
parents 46e859ee4d2e
children 3d2dbe3e8a4c
files MoinMoin/PageEditor.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/PageEditor.py	Sun Mar 18 21:46:32 2007 +0100
+++ b/MoinMoin/PageEditor.py	Sun Mar 18 22:32:39 2007 +0100
@@ -498,6 +498,9 @@
         if not newpagename:
             return False, _("You can't copy to an empty pagename.")
 
+        if not self.request.user.may.write(newpagename):
+            return False, _('You are not allowed to copy this page!')
+    
         newpage = PageEditor(request, newpagename)
 
         pageexists_error = _("""'''A page with the name {{{'%s'}}} already exists.'''