changeset 3867:4082eab1fe16

revert action: fixed (too much copy and paste error)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 17 Jul 2008 11:39:28 +0200
parents ee74cf49c1ca
children 4f050cf6627e
files MoinMoin/action/revert.py
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/revert.py	Mon Jul 14 23:23:27 2008 +0200
+++ b/MoinMoin/action/revert.py	Thu Jul 17 11:39:28 2008 +0200
@@ -3,7 +3,7 @@
     MoinMoin - revert a page to a previous revision
 
     @copyright: 2000-2004 Juergen Hermann <jh@web.de>,
-                2006 MoinMoin:ThomasWaldmann,
+                2006-2008 MoinMoin:ThomasWaldmann,
                 2007 MoinMoin:ReimarBauer,
                 2008 MoinMoin:JohannesBerg
     @license: GNU GPL, see COPYING for details.
@@ -30,7 +30,7 @@
         # as well
         _ = self._
         may = self.request.user.may
-        allowed = may.write(self.pagename) and may.delete(self.pagename)
+        allowed = may.write(self.pagename) and may.revert(self.pagename)
         return allowed, _('You are not allowed to revert this page!')
 
     def check_condition(self):
@@ -42,9 +42,6 @@
                      'If you want to revert to an older revision, first view that older revision and '
                      'then call revert to this (older) revision again.')
             return note
-
-        if not self.page.exists():
-            return _('This page is already deleted or was never created!')
         else:
             return None