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
--- 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)