changeset 3472:4abf8492a665

theme.__init__:revert action enabled only if user can revert
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sat, 05 Apr 2008 11:19:45 +0200
parents a98d9f52813e
children 59a4005672d3
files MoinMoin/theme/__init__.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/theme/__init__.py	Sat Apr 05 11:07:12 2008 +0200
+++ b/MoinMoin/theme/__init__.py	Sat Apr 05 11:19:45 2008 +0200
@@ -968,6 +968,11 @@
                     data['action'] = 'show'
                     data['disabled'] = disabled
 
+            # revert action enabled only if user can revert
+            if action == 'revert' and not request.user.may.revert(page.page_name):
+                data['action'] = 'show'
+                data['disabled'] = disabled
+
             # Special menu items. Without javascript, executing will
             # just return to the page.
             elif action.startswith('__'):