# HG changeset patch # User Reimar Bauer # Date 1207387185 -7200 # Node ID 4abf8492a6655e75948cb0b664994cd79eed1f06 # Parent a98d9f52813e5d2eb32d778558f4024aae507dba theme.__init__:revert action enabled only if user can revert diff -r a98d9f52813e -r 4abf8492a665 MoinMoin/theme/__init__.py --- 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('__'):