prepare for hiding concepts from parents portlet for certain roles
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3834 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
c2a5a9cca8
commit
e70bea85e5
1 changed files with 5 additions and 1 deletions
|
@ -313,7 +313,11 @@ class ConceptView(BaseView):
|
|||
def isHidden(self, pr):
|
||||
hideRoles = IOptions(adapted(pr.first.conceptType))('hide_for', None)
|
||||
if hideRoles is not None:
|
||||
roles = getRolesForPrincipal(self.request.principal.id, self.context)
|
||||
principal = self.request.principal
|
||||
if (IUnauthenticatedPrincipal.providedBy(principal) and
|
||||
'zope.Anonymous' in hideRoles):
|
||||
return True
|
||||
roles = getRolesForPrincipal(principal.id, self.context)
|
||||
for r in roles:
|
||||
if r in hideRoles:
|
||||
return True
|
||||
|
|
Loading…
Add table
Reference in a new issue