Commit 8e5c2522 authored by Łukasz Nowak's avatar Łukasz Nowak Committed by Alain Takoudjou

Allow to make specific sections only for logged in users.

parent 6e2c5987
...@@ -228,6 +228,12 @@ class WebSection(Domain, DocumentExtensibleTraversableMixin): ...@@ -228,6 +228,12 @@ class WebSection(Domain, DocumentExtensibleTraversableMixin):
original_container=document.getParentValue(), original_container=document.getParentValue(),
original_id=document.getId(), original_id=document.getId(),
editable_absolute_url=document.absolute_url())).__of__(self) editable_absolute_url=document.absolute_url())).__of__(self)
else:
isAuthorizationForced = getattr(self, 'isAuthorizationForced', None)
if isAuthorizationForced is not None and isAuthorizationForced():
if self.getPortalObject().portal_membership.isAnonymousUser():
# force anonymous to login
raise Unauthorized
# Try to use a custom renderer if any # Try to use a custom renderer if any
custom_render_method_id = self.getCustomRenderMethodId() custom_render_method_id = self.getCustomRenderMethodId()
if custom_render_method_id is not None: if custom_render_method_id is not None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment