title: Changing ownership of an object does not give permissions to the new owner
body: <p>My application automatically creates contents when an object's workflow state is changed. But this new content is created with the user changing the state as the owner. I would like to give ownership to another user. The new user is indeed owner, but he doesn't have the permission to edit the content. It is a custom dexterity content type.</p>
  
  <p>I tried this:</p>
  
  <pre><code>company.changeOwnership(mtool.getMemberById(context.username))
  company.manage_setLocalRoles(context.username, ['Owner'])
  company.setCreators([context.username])
  company.reindexObjectSecurity()
  </code></pre>
  
  <p>Is something missing ? The only information I found was this <a href="http://www.uwosh.edu/ploneprojects/docs/how-tos/scripts-to-change-owner-of-an-item" rel="nofollow">script</a>, but the creator said he had to set the permissions using the @@sharing view.</p>
  
  <p>Thanks.</p>