changeset 1845:6ccc22836dd1

PageEditor.renamePage: added acl raise condition
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Fri, 02 Mar 2007 05:00:52 +0100
parents 58ebb64243cc
children ca2c9a7f06c6
files MoinMoin/PageEditor.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/PageEditor.py	Thu Mar 01 16:02:00 2007 +0100
+++ b/MoinMoin/PageEditor.py	Fri Mar 02 05:00:52 2007 +0100
@@ -498,6 +498,12 @@
         """
         request = self.request
         _ = self._
+
+        if not (request.user.may.delete(self.page_name)
+                and request.user.may.write(newpagename)):
+            msg = _('You are not allowed to rename this page!')
+            raise self.AccessDenied, msg
+
         if not newpagename:
             return False, _("You can't rename to an empty pagename.")