Added allowsidebar to checkIsDocumentReadable.
authorLennard de Rijk <ljvderijk@gmail.com>
Wed, 11 Feb 2009 20:10:53 +0000
changeset 1265 cecb2b35f805
parent 1264 4d46b09f3751
child 1266 e8feadcbc47f
Added allowsidebar to checkIsDocumentReadable. Note that this means that documents you can't actually read might show up in the sidebar. A todo has been added to fix this. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
app/soc/views/helper/access.py
app/soc/views/models/document.py
--- a/app/soc/views/helper/access.py	Wed Feb 11 20:05:33 2009 +0000
+++ b/app/soc/views/helper/access.py	Wed Feb 11 20:10:53 2009 +0000
@@ -900,6 +900,7 @@
 
     return
 
+  @allowSidebar
   @allowDeveloper
   def checkIsDocumentReadable(self, django_args):
     """Checks whether a document is readable.
--- a/app/soc/views/models/document.py	Wed Feb 11 20:05:33 2009 +0000
+++ b/app/soc/views/models/document.py	Wed Feb 11 20:10:53 2009 +0000
@@ -161,6 +161,7 @@
 
     # add a link to all featured documents
     for entity in entities:
+      #TODO only if a document is readable it might be added
       submenu = (redirects.getPublicRedirect(entity, self._params),
                  entity.short_name, 'show')
       submenus.append(submenu)