[Zope] proxy roles
Eddy Ilg
eddy at fericom.net
Wed Mar 16 11:48:37 EST 2005
Dieter Maurer wrote:
> Eddy Ilg wrote at 2005-3-11 20:57 +0100:
>
>>...
>>it says:
>>"Unauthorized: You are not allowed to access Member in this context".
>>Member is a product. How can I authorize the user to access the product?
>>(The user has permission "Add Members").
>
>
> We also need the traceback (always! when there is one!).
Here is the full traceback:
Site Error Log at /error_log
Exception traceback
Time 2005/03/16 17:45:20.354 GMT+1
User Name (User Id) Eddy.Ilg (Eddy.Ilg)
Request URL http://guinies.fericom.net/newMemberAction
Exception Type Unauthorized
Exception Value You are not allowed to access manage_changeProperties in
this context
Traceback (innermost last):
Module ZPublisher.Publish, line 98, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 39, in call_object
Module Shared.DC.Scripts.Bindings, line 306, in __call__
Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
Module Products.PythonScripts.PythonScript, line 307, in _exec
Module None, line 28, in newMemberAction
<PythonScript at /guinies/newMemberAction>
Line 28
Module Shared.DC.Scripts.Bindings, line 306, in __call__
Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
Module Products.PythonScripts.PythonScript, line 307, in _exec
Module None, line 4, in GuinieMember_add
<PythonScript at /guinies/members/GuinieMember_add>
Line 4
Unauthorized: You are not allowed to access manage_changeProperties in
this context
> Are you sure that in this context "Member" is really a (Zope) product
> (this has a precise meaning!)?
Yes, it is.
> You are not supposed to access products directly but through
> a "ProductsDispatcher" ("dest.manage_addProduct[product_name]").
I am using that, here is the portion of my script:
container.members.manage_addProduct["GuinieMember"].GuinieMember_add(Vorname,Nachname)
Password=generatePassword()
container.acl_users.manage_users('Add',{"name":Vorname+'.'+Nachname,"password":Password,"confirm":Password,"roles":[],"domains":[],})
Already the first line raises an error. The user is a user of the local
acl folder (Does this matter?). The script has the proxy role manager set.
Eddy
More information about the Zope
mailing list