[Zope] How to get the owner of an object?

Jerome Alet alet@librelogiciel.com
Tue, 10 Sep 2002 18:36:32 +0200


On Tue, Sep 10, 2002 at 11:22:46AM -0500, Borislav wrote:
> I was unable to find the method to get the owner of an object through 
> the Zope APIs. Any info will be appreciated.

--- CUT ---
ownerid = None
ownerinfo = object.owner_info()
if ownerinfo is not None :
        # at least /Control_Panel/Products[/*] doesn't satisfy the following test
        if hasattr(ownerinfo, "has_key") and ownerinfo.has_key('id') :
                ownerid = ownerinfo['id']
--- CUT ---                

hth                

Jerome Alet