If I add a folder in my python code as follows (where users is where I wish to create this folder and username is to be the name of the folder): manage_addFolder(users, username, username) How do I go about changing the owner of that folder (to the user named by the 'username' variable)? If 'uF' is a handle to the folder object created above, the method: uF.changeOwnership(username) fails. It appears that changeOwnership() expects an actual user object and not the character string. I then tried using the 'getUser()' method to retrieve the user object associated w/ the name but keep getting NotImplentedErrors. Clearly I'm doing something pretty wrong here - the newest documentation I can find on the subject is the developers guide for Zope 2.4, which perhaps is out of date? Thanks -J
Am 07.02.2005, 21:24 Uhr schrüb Jeff Gentry <jgentry@jimmy.harvard.edu>:
It appears that changeOwnership() expects an actual user object and not the character string. I then tried using the 'getUser()' method to retrieve the user object associated w/ the name but keep getting NotImplentedErrors.
getUser() AFAIK is a method of UserFolder (e.g. acl_users). To get the user object you'd have to first get hold of the UserFolder the user object lives in. Best regards, Jo. -- internetmanufaktur jo----------------------------- Berlin, Germany |||||||||||||||meder-------------------fon: ++49-30-417 17 63 33 http://www.meder.de/ ------------------- fax: ++49-30-417 17 63 45 Kollwitzstr. 75 ------------------------ mob: ++49-170- 2 98 89 97 10435 Berlin ---------------http://www.meder.de/keys/jo-pubkey.txt
Jeff Gentry wrote at 2005-2-7 15:24 -0500:
If I add a folder in my python code as follows (where users is where I wish to create this folder and username is to be the name of the folder):
manage_addFolder(users, username, username)
How do I go about changing the owner of that folder (to the user named by the 'username' variable)?
If 'uF' is a handle to the folder object created above, the method:
uF.changeOwnership(username)
fails.
Are you sure you want to change this (executable) ownership? It does not directly have an effect on the folder itself (but may have an effect on executable objects below the folder). Or are you in fact interested in the "Owner" local role? -- Dieter
participants (3)
-
Dieter Maurer -
Jeff Gentry -
Jo Meder