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.