If there is no user account, don't show New Document link under Site
authorSverre Rabbelier <srabbelier@gmail.com>
Sat, 07 Feb 2009 22:47:51 +0000
changeset 1247 eaf9d539382f
parent 1246 756fd7195213
child 1248 f318538394d9
If there is no user account, don't show New Document link under Site Patch by: Sverre Rabbelier
app/soc/views/models/site.py
--- a/app/soc/views/models/site.py	Sat Feb 07 22:10:19 2009 +0000
+++ b/app/soc/views/models/site.py	Sat Feb 07 22:47:51 2009 +0000
@@ -113,7 +113,7 @@
 
     if entity:
       submenus += document_view.view.getMenusForScope(entity, self._params)
-      if accounts.isDeveloper(id, user):
+      if user and accounts.isDeveloper(id, user):
         submenus += [(redirects.getCreateDocumentRedirect(entity, 'site'),
             "Create a New Document", 'any_access')]