diff MoinMoin/action/SyncPages.py @ 1884:da6479b19bd2

SyncPages:bug fixed for saving write protected page
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Mon, 12 Mar 2007 22:15:34 +0100
parents ebcebba1afb3
children ffe2e789a7c6
line wrap: on
line diff
--- a/MoinMoin/action/SyncPages.py	Mon Mar 12 21:45:46 2007 +0100
+++ b/MoinMoin/action/SyncPages.py	Mon Mar 12 22:15:34 2007 +0100
@@ -282,8 +282,12 @@
                 # XXX add locking, acquire read-lock on sp
                 if debug:
                     self.log_status(ActionClass.INFO, raw_suffix="Processing %r" % sp)
-    
+
                 local_pagename = sp.local_name
+                if not self.request.user.may.write(local_pagename):
+                    self.log_status(ActionClass.WARN, _("Skipped page %s because of no write access to local page."), (local_pagename, ))
+                    return
+
                 current_page = PageEditor(self.request, local_pagename) # YYY direct access
                 comment = u"Local Merge - %r" % (remote.get_interwiki_name() or remote.get_iwid())