changeset 4726:be20177b2c0e

action PackagePages: since we don't store the package file on the given page we don't need to check for write rights on that page
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 31 May 2009 10:47:03 +0200
parents 70c8457d68ab
children 9b6b7ff7f5ac
files MoinMoin/action/PackagePages.py MoinMoin/theme/__init__.py
diffstat 2 files changed, 2 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/PackagePages.py	Mon May 25 22:49:56 2009 +0200
+++ b/MoinMoin/action/PackagePages.py	Sun May 31 10:47:03 2009 +0200
@@ -34,9 +34,7 @@
 
     def allowed(self):
         """ Check if user is allowed to do this. """
-        may = self.request.user.may
-        return (not self.__class__.__name__ in self.request.cfg.actions_excluded and
-                may.write(self.pagename))
+        return not self.__class__.__name__ in self.request.cfg.actions_excluded
 
     def render(self):
         """ Render action
--- a/MoinMoin/theme/__init__.py	Mon May 25 22:49:56 2009 +0200
+++ b/MoinMoin/theme/__init__.py	Sun May 31 10:47:03 2009 +0200
@@ -1011,12 +1011,7 @@
             if action == 'SubscribeUser' and not request.user.may.admin(page.page_name):
                 data['action'] = 'show'
                 data['disabled'] = disabled
-
-            # PackagePages action only if user has write rights
-            if action == 'PackagePages' and not request.user.may.write(page.page_name):
-                data['action'] = 'show'
-                data['disabled'] = disabled
-
+            
             # Despam action enabled only for superusers
             if action == 'Despam' and not request.user.isSuperUser():
                 data['action'] = 'show'