On Sat, Mar 18, 2006 at 10:32:39AM +0000, Rupert Redington wrote:
> When I try to make a permission or role based grant to zope.anybody
> through zcml I fail with:
>  File "/home/rupert/Zope3/lib/python/zope/app/security/principal.py",
> line 50, in checkPrincipal
>     raise ValueError("Undefined principal id", principal_id)
> zope.configuration.config.ConfigurationExecutionError:
> exceptions.ValueError: ('Undefined principal id', 'zope.anybody')
> But the principal is defined in principals.zcml...
> If I try to overrride 'zope.anybody' by declaring my own
> unauthenticatedPrincipal in overrides.zcml my grant fails in a similar
> manner.
> Is it possible to make grants to the unauthenticatedPrincipal?


> What am I missing this time?

You most probably tried to grant before defining the principal.
Have a look at etc/site.zcml - securitypolicy.zcml is processed
before principals.zcml . Placing your '<grant>' somewhere
behind those two includes should work.


Zope3-users mailing list

Reply via email to