context.manage_addLocalRoles is not what I was looking for, it's more of a work-around. And I was hoping to avoid fiddling with the source code. It breaks upgrades released by Zope. Thanks all, I was hoping for an easy answer. -----Original Message----- From: Chris Withers [mailto:chrisw@nipltd.com] Sent: Wednesday, September 10, 2003 14:20 To: Paavo Parkkinen Cc: 'zope@zope.org' Subject: Re: [Zope] Give Ownership Paavo Parkkinen wrote:
On Wed, 10.09.2003 at 07:32 +0300, Paavo Parkkinen wrote:
On Wed, 10.09.2003 at 08:16 +0400, Samir Mishra wrote:
I know I can "take ownership" of objects, but is there a convenient way to "give ownership" to someone?
context.manage_addLocalRoles(username, ['role'])
I'm such a moron. Of course 'role' should be 'Owner'.
That's the same as the Owner role Andreas was talking about, I don't think it's "Ownership" of the sense that Samir was talking about. Not sure you can 'give' ownership. If you really had to, I'd probably do it as an external method and take a look at the code for the "take ownership" method and adapt that... Chris _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Samir Mishra schrieb:
context.manage_addLocalRoles is not what I was looking for, it's more of a work-around. And I was hoping to avoid fiddling with the source code. It breaks upgrades released by Zope.
Thanks all, I was hoping for an easy answer.
Hi, Samir, there is a method changeOwnership(self, user[,...]) in the Owned class (AccessControl/Owned.py) that might help you. It seems to take the user as an user object. Tobias
Tobias Herp wrote:
there is a method changeOwnership(self, user[,...]) in the Owned class (AccessControl/Owned.py) that might help you. It seems to take the user as an user object.
That'll bve the oen Samir's after... Most objects will have this method since most objects are 'owned' :-) Chris
participants (3)
-
Chris Withers -
Samir Mishra -
Tobias Herp