include reporter package in cybertools configure; suppress zmi actions if not appropriate
git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@1239 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
d171dddc0e
commit
a12f37eb31
2 changed files with 5 additions and 1 deletions
|
@ -23,10 +23,13 @@ $Id$
|
|||
"""
|
||||
|
||||
from zope.app.publisher. browser import menu
|
||||
from zope.app.securitypolicy.interfaces import IPrincipalRoleManager
|
||||
from zope.security import checkPermission
|
||||
|
||||
class MenuAccessView(menu.MenuAccessView):
|
||||
|
||||
def __getitem__(self, menuId):
|
||||
if menuId in ('zmi_actions', 'help_actions'):
|
||||
return []
|
||||
if not checkPermission('zope.ManageSite', self.context):
|
||||
return []
|
||||
return super(MenuAccessView, self).__getitem__(menuId)
|
||||
|
|
|
@ -7,5 +7,6 @@
|
|||
|
||||
<include package=".browser" />
|
||||
<include package=".relation" />
|
||||
<include package=".reporter" />
|
||||
|
||||
</configure>
|
||||
|
|
Loading…
Add table
Reference in a new issue