From: wichert <svn...@pl...> - 2006-05-27 16:57:51
|
Author: wichert Date: Sat May 27 16:56:48 2006 New Revision: 9908 Modified: CMFPlone/branches/2.5/HISTORY.txt CMFPlone/branches/2.5/PloneTool.py Log: The new owner is identified by his/her userid, not by the users name. fixes #5535 Modified: CMFPlone/branches/2.5/HISTORY.txt ============================================================================== --- CMFPlone/branches/2.5/HISTORY.txt (original) +++ CMFPlone/branches/2.5/HISTORY.txt Sat May 27 16:56:48 2006 @@ -4,6 +4,11 @@ Plone 2.5 (unreleased) + - When changing ownership of an object the new owner is identified by a + userid, not the username. Adjust the implementation accordingly. This + fixes http://dev.plone.org/plone/ticket/5535 + [wichert] + - Fixed private attribute access in PloneBaseTool createExprContext to use the API. This way it will also work with the Zope3 TAL engine. [hannosch] Modified: CMFPlone/branches/2.5/PloneTool.py ============================================================================== --- CMFPlone/branches/2.5/PloneTool.py (original) +++ CMFPlone/branches/2.5/PloneTool.py Sat May 27 16:56:48 2006 @@ -434,11 +434,11 @@ security.declareProtected(ManagePortal, 'changeOwnershipOf') - def changeOwnershipOf(self, object, owner, recursive=0): + def changeOwnershipOf(self, object, userid, recursive=0): """Changes the ownership of an object.""" membership = getToolByName(self, 'portal_membership') acl_users = getattr(self, 'acl_users') - user = acl_users.getUser(owner) + user = acl_users.getUserById(userid) if user is None: raise KeyError, 'Only retrievable users in this site can be made owners.' object.changeOwnership(user, recursive) |