[Zope3-Users] Grant role top zope.anybody
Marius Gedminas
mgedmin at b4net.lt
Sat Feb 17 17:35:13 EST 2007
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:
>
> <grant
> role = "my.role"
> principal = "zope.anybody"
> />
>
> But this gives a unknown principal id error, even though I have:
>
> <unauthenticatedPrincipal
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20070218/8531ce7b/attachment.bin
More information about the Zope3-users
mailing list