changeset 3170:50147905729a

allow actions on non-existing pages
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 02 Mar 2008 16:26:37 +0100
parents a654cf294f4e
children b23656c17a0b
files MoinMoin/request/__init__.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/request/__init__.py	Sun Mar 02 15:57:43 2008 +0100
+++ b/MoinMoin/request/__init__.py	Sun Mar 02 16:26:37 2008 +0100
@@ -791,9 +791,10 @@
         @return: dict of avaiable actions
         """
         if self._available_actions is None:
-            # Add actions for existing pages only, including deleted pages.
-            # Fix *OnNonExistingPage bugs.
-            if not (page.exists(includeDeleted=1) and self.user.may.read(page.page_name)):
+            # some actions might make sense for non-existing pages, so we just
+            # require read access here. Can be later refined to some action
+            # specific check:
+            if not self.user.may.read(page.page_name):
                 return []
 
             # Filter non ui actions (starts with lower case letter)