[Zope] Acquisition / proxying object

Joerg Baach lists at baach.de
Mon Feb 25 17:03:28 EST 2008


Hi again,

> 2008-02-25T22:30:18 DEBUG ImplPython Unauthorized: Your user account does not 
> have the required permission.  Access to 'manage' of (Application at ) 
> denied. Your user account, Anonymous User, exists at /acl_users. Access 
> requires one of the following roles: ['Manager']. Your roles in this context 
> are ['Anonymous'].

Actually, if I change my code to something like:


    def __of__(self, parent):
        '''foo'''
        if not hasattr(parent,'aq_base'):
            return self

        folder,id = self.remoteid.split(':')
        acl = parent.restrictedTraverse(folder)
        remote = acl.getUser(id)
        self = Acquisition.ImplicitAcquisitionWrapper(self, remote)
        self = Acquisition.ImplicitAcquisitionWrapper(self, parent)
        return self

(idea taken from
http://www.mail-archive.com/zope-dev@zope.org/msg11713.html)

I get a

Error Type: Unauthorized
Error Value: Your user account is defined outside the context of the
object being accessed. Access to 'ldapproxy' of (Folder at /testfolder)
denied. Your user account, admin, exists at /acl_users. Access requires
one of the following roles: ['Manager'].

Well, admin has 'Manager'.

/me scratches his head

Cheers,

  Joerg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://mail.zope.org/pipermail/zope/attachments/20080225/3a51ac94/signature.bin


More information about the Zope mailing list