Re: [Zope3-Users] Grants to unathenticatedPrincipal[Resolved]

2006-03-20 Thread Rupert Redington
Frank Burkhardt wrote:
> Hi,
> 
> On Sat, Mar 18, 2006 at 10:32:39AM +, 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 '' somewhere
> behind those two includes should work.
> 
> Regards,
> 
> Frank

Thanks Frank,

That was it indeed...

Rupert
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Grants to unathenticatedPrincipal

2006-03-20 Thread Frank Burkhardt
Hi,

On Sat, Mar 18, 2006 at 10:32:39AM +, 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 '' somewhere
behind those two includes should work.

Regards,

Frank
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Grants to unathenticatedPrincipal

2006-03-18 Thread Rupert Redington
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?

Cheers

Rupert
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users