show parents/related concepts portlet for anonymous if site option 'showParentsForAnonymous' is set
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3588 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
1ab58bf55b
commit
5d55079349
2 changed files with 22 additions and 18 deletions
|
@ -194,8 +194,10 @@ class ConceptView(BaseView):
|
|||
def __init__(self, context, request):
|
||||
super(ConceptView, self).__init__(context, request)
|
||||
cont = self.controller
|
||||
if (cont is not None and not IUnauthenticatedPrincipal.providedBy(
|
||||
self.request.principal)):
|
||||
if cont is None:
|
||||
return
|
||||
if (self.globalOptions('showParentsForUnauthorized') or
|
||||
not IUnauthenticatedPrincipal.providedBy(self.request.principal)):
|
||||
cont.macros.register('portlet_right', 'parents', title=_(u'Parents'),
|
||||
subMacro=concept_macros.macros['parents'],
|
||||
priority=20, info=self)
|
||||
|
|
|
@ -137,9 +137,11 @@ class ResourceView(BaseView):
|
|||
|
||||
def __init__(self, context, request):
|
||||
super(ResourceView, self).__init__(context, request)
|
||||
if not IUnauthenticatedPrincipal.providedBy(self.request.principal):
|
||||
cont = self.controller
|
||||
if cont is not None:
|
||||
if cont is None:
|
||||
return
|
||||
if (self.globalOptions('showParentsForUnauthorized') or
|
||||
not IUnauthenticatedPrincipal.providedBy(self.request.principal)):
|
||||
if list(self.relatedConcepts()):
|
||||
cont.macros.register('portlet_right', 'related',
|
||||
title=_(u'Related Items'),
|
||||
|
|
Loading…
Add table
Reference in a new issue