I'm using the following method to change the ownership of an Object: from AccessControl.Owned import Owned def changeOwner(pObject,pUserFolder,pUsername=''): userObject=pUserFolder.getUser(pUsername).__of__(pUserFolder) pObject.changeOwnership(userObject) Owned.changeOwnership(pObject,userObject,recursive=1) And I call it as follows: <dtml-call "REQUEST.set(objectValue, REQUEST.resolve_url('www.myurl.com/myFolder'))"> <dtml-call "changeOwner(objectValue,acl_users,'tester')"> The above solution changes the ownership of the folder and the objects inside of it (I can see it on the manage interface). My problem now is that I get the following error whenever I try to edit an object that I own: Site Error An error was encountered while publishing this resource. Unauthorized You are not authorized to access indexObject. Why do I get this message if I own the object which I want to modify? It doesn't happen if I create a new object rather than transfer the ownership. What am doing wrong? Thanks in advanced, Josef.
On Thu, Jan 10, 2002 at 07:36:47PM +0100, Josef Meile wrote:
Why do I get this message if I own the object which I want to modify? It doesn't happen if I create a new object rather than transfer the ownership. What am doing wrong?
There's a bug in changeOwnership, which was reported several times to this list, even with the one-line patch needed... without any effect so far... This bug prevents changeOwnership to do anything if you already own the object on which you apply it. However at first glance your problem doesn't seem to be related to this bug, but maybe a second glance could help... bye, Jerome Alet
participants (2)
-
Jerome Alet -
Josef Meile