[Zope3-Users] Grants to unathenticatedPrincipal[Resolved]
    Rupert Redington 
    rupert at neontribe.co.uk
       
    Mon Mar 20 13:10:25 EST 2006
    
    
  
Frank Burkhardt wrote:
> Hi,
> 
> 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?
> 
> Yes.
> 
>> 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.
> 
> Regards,
> 
> Frank
Thanks Frank,
That was it indeed...
Rupert
    
    
More information about the Zope3-users
mailing list