If there is no user account, don't show New Document link under Site
Patch by: Sverre Rabbelier
--- 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')]