[Zope3-dev] Re: Login despite zope.Public
Florian Lindner
mailinglists at xgm.de
Wed Oct 13 05:40:58 EDT 2004
Philipp von Weitershausen schrieb:
> Florian Lindner wrote:
>
>> Why do I need to log in?
>
>
> I guess that some object you're accessing (view, content, utility,
> etc.) requires more than just zope.Public privileges.
Yeah, you were right. The Class itselfs were registered with
zope.ManageContent permissions. I've changed it to
<content class=".event.Event">
<implements
interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
<factory id="CS.Event.event.Event" description="CS Event"/>
<require permission="zope.Public" interface=".interfaces.IEvent" />
<require permission="zope.Public" set_schema=".interfaces.IEvent" />
</content>
>
>> One more question:
>> What permission has precedence? The permission used while registering
>> the view (for interfaces.IEvent) or the one for the template (name=
>> skin_macros) or the one of the class=.standardmacros.StandardMacros??
>
>
> None takes precendence, they all count in. StandardMacros, skin_macros
> etc. are views that are simply looked up for which you need to have
> the correct privileges.
>
> Btw, this may just be a matter of taste, but I prefer not protecting
> even public pages with zope.Public. I prefer protecting them with
> zope.View or mypackage.View and granting that permission to the
> anonymous principal.
Thx for the hint, but I for now I prefer the easiest way.
Thanks,
Florian
More information about the Zope3-dev
mailing list