changeset 1296:93ecff3f806f

Check for local write permissions early, fixed Python 2.3 incompatiblity.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Tue, 15 Aug 2006 21:52:22 +0200
parents 9608758dca9a
children 2625857eabf0
files MoinMoin/action/SyncPages.py MoinMoin/wikisync.py
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/SyncPages.py	Mon Aug 14 22:52:14 2006 +0200
+++ b/MoinMoin/action/SyncPages.py	Tue Aug 15 21:52:22 2006 +0200
@@ -24,8 +24,8 @@
 from MoinMoin.PageEditor import PageEditor, conflict_markers
 from MoinMoin.Page import Page
 from MoinMoin.wikidicts import Dict, Group
-from MoinMoin.wikisync import (TagStore, UnsupportedWikiException, SyncPage,
-                               MoinLocalWiki, MoinRemoteWiki, UP, DOWN, BOTH)
+from MoinMoin.wikisync import TagStore, UnsupportedWikiException, SyncPage
+from MoinMoin.wikisync import MoinLocalWiki, MoinRemoteWiki, UP, DOWN, BOTH
 from MoinMoin.util.bdiff import decompress, patch, compress, textdiff
 from MoinMoin.util import diff3
 
--- a/MoinMoin/wikisync.py	Mon Aug 14 22:52:14 2006 +0200
+++ b/MoinMoin/wikisync.py	Tue Aug 15 21:52:22 2006 +0200
@@ -261,6 +261,8 @@
 
     def createSyncPage(self, page_name):
         normalised_name = normalise_pagename(page_name, self.prefix)
+        if not self.request.user.may.write(normalised_name):
+            return None
         if normalised_name is None:
             return None
         return SyncPage(normalised_name, local_rev=Page(self.request, page_name).get_real_rev(), local_name=page_name)