--- a/app/soc/views/models/site.py Thu Feb 26 16:57:13 2009 +0000
+++ b/app/soc/views/models/site.py Thu Feb 26 16:58:15 2009 +0000
@@ -28,6 +28,7 @@
from soc.logic import accounts
from soc.logic import cleaning
from soc.logic import dicts
+from soc.views import out_of_band
from soc.views.helper import access
from soc.views.helper import redirects
from soc.views.helper import widgets
@@ -118,7 +119,16 @@
if entity:
submenus += document_view.view.getMenusForScope(entity, self._params)
- if user and accounts.isDeveloper(id, user):
+
+ try:
+ rights = self._params['rights']
+ rights.setCurrentUser(id, user)
+ rights.checkIsHost()
+ is_host = True
+ except out_of_band.Error:
+ is_host = False
+
+ if is_host:
submenus += [(redirects.getCreateDocumentRedirect(entity, 'site'),
"Create a New Document", 'any_access')]