I see three problems:
You call
getObject()
repeatedly. That is a relatively expensive operation, cache the result in a local variable instead:obj = brain.getObject()
You called
setCreators()
with one argument, not a list:obj.setCreators([creator])
You don't change the
Owner
role:roles = list(obj.get_local_roles_for_userid(crtor_obj)) if 'Owner' not in roles: roles.append('Owner') obj.manage_setLocalRoles(crtor_obj, roles)
There is a plone.app.changeownership
product that takes care of all these details for you.