Re: [Zope3-Users] Grant role top zope.anybody
On Sun, Feb 18, 2007 at 11:47:06AM +0100, Florian Lindner wrote: > Am Samstag, 17. Februar 2007 23:35 schrieb Marius Gedminas: > > On Sat, Feb 17, 2007 at 12:48:05PM +0100, Florian Lindner wrote: > > ZCML is order-dependent (sadly). You need to put your grant after the > > principal definition. This means doing it in principals.zcml, or in > > some file that is included in site.zcml after principals.zcml. > > The grant is contained in a security.zcml which is invoked from a > configure.zcml from a package residing in the zope instance. I don't know > about the order. Are the package configure.zcml invoked before > principal.zcml? Yes. Look at site.zcml, which is the top-level file that includes everything. Marius Gedminas -- Be cheerful. Strive to be happy Oh, and we just set fire to your desktop. signature.asc Description: Digital signature ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Grant role top zope.anybody
Am Samstag, 17. Februar 2007 23:35 schrieb Marius Gedminas: > On Sat, Feb 17, 2007 at 12:48:05PM +0100, Florian Lindner wrote: > > Hello, > > I've tried to grant a role to zope.anybody (any user that visits the > > site). Tried it this way: > > > > > role = "my.role" > > principal = "zope.anybody" > > /> > > > > But this gives a unknown principal id error, even though I have: > > > >> id="zope.anybody" > > title="Unauthenticated User" /> > > > > in my principal.zcml. > > > > How to do it right? > > ZCML is order-dependent (sadly). You need to put your grant after the > principal definition. This means doing it in principals.zcml, or in > some file that is included in site.zcml after principals.zcml. The grant is contained in a security.zcml which is invoked from a configure.zcml from a package residing in the zope instance. I don't know about the order. Are the package configure.zcml invoked before principal.zcml? Thanks, Florian ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Grant role top zope.anybody
On Sat, Feb 17, 2007 at 12:48:05PM +0100, Florian Lindner wrote: > Hello, > I've tried to grant a role to zope.anybody (any user that visits the site). > Tried it this way: > > role = "my.role" > principal = "zope.anybody" > /> > > But this gives a unknown principal id error, even though I have: > >id="zope.anybody" > title="Unauthenticated User" /> > > in my principal.zcml. > > How to do it right? ZCML is order-dependent (sadly). You need to put your grant after the principal definition. This means doing it in principals.zcml, or in some file that is included in site.zcml after principals.zcml. Marius Gedminas -- If something has not yet gone wrong then it would ultimately have been beneficial for it to go wrong. signature.asc Description: Digital signature ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users