I'm not sure what you mean by a 'wrapped' user. What causes a user to have a wrapper in Zope?

I am getting the 'other' user via the following code:

user = context.acl_users.getUserById(username)

Will this cause the user to be returned with a wrapper, and if so, how would I remove the wrapper?

Thanks.

Jens Vagelpohl wrote:


On 12 Jul 2005, at 14:03, Nicholas Watmough wrote:

I'm trying to access the getProperty() method of the LDAPUser class in a Python script, in order to access the Active Directory email address of the user.

There is no problem with this, if I use the method on the current active user. However, it doesn't work when I attempt to use the method on another property.

The output of VerboseSecurity is:

*Error Type: Unauthorized*
*Error Value: Your user account does not have the required permission. Access to 'getProperty' of nwuser denied. Your user account, abuser, exists at /acl_users. Access requires one of the following roles: ['Manager']. Your roles in this context are ['Anonymous', 'Authenticated', 'User'].*

It appears that the currently authenticated used has the 'View' permission (required to use getProperty) on itself, but not for other users. I'm not sure how to change this.


I'm assuming that the "other" user is not wrapped. How are you getting that other user object?

jens

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to