Jérôme Loisel wrote:
Hi! I am trying to find a function which determines who an object's owner is. For example, say I want to list all items in a folder like so...
Item_Name (owned by User_Name)
Can anyone tell me which function to use? Thanks.
-- Jérôme Loisel Lévinux: GNU/Linux dans les communautés à Lévis
Zope objects have a method called owner_info used to get ownership info in DTML for display. In Python you can use the getOwner method of the object. owner_info returns a dictionary like so: {'userCanChangeOwnershipType': 1, 'id': 'cduncan', 'explicit': 1, 'path': 'acl_users'} So, to print the owner of an object: <dtml-with owner_info mapping><dtml-var id></dtml-with> or <dtml-var expr="owner_info()['id']"> This doesn't work very well for DTML methods though... -- | Casey Duncan | Kaivo, Inc. | cduncan@kaivo.com `------------------>