changeset 21:37b549ed2ebd

Don't display edit bar at all when the page is not writable
author Radomir Dopieralski <devel@sheep.art.pl>
date Thu, 05 Jun 2008 14:49:03 +0200
parents cdc005195f44
children cd0a86c0d613
files mfact.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mfact.py	Thu Jun 05 13:05:35 2008 +0200
+++ b/mfact.py	Thu Jun 05 14:49:03 2008 +0200
@@ -153,6 +153,9 @@
     def editbar(self, d, **keywords):
         if not self.shouldShowEditbar(d['page']):
             return u''
+        if not (page.isWritable() and
+                self.request.user.may.write(page.page_name)):
+            return u""
         parts = [
             u'<ul class="editbar">',
             self.edit_link(d),