Hi, When trying to give (with an externat method) an authentified user the ownership of a folder and - recursively - its content, I noticed that when that folder is already owned by that user, the somefolder.changeOwnership(someuser, recursive=1) did not work on objects contained in that folder (always owned by the former owner). When reading the source (lib/python/AccessControl/Owned.py), I noticed this (lines 106...108) in changeOwnership(): old=aq_get(self, '_owner', None, 1) if old==new: return if old is UnownableOwner: return Means that if the new owner is the former owner, changeOwnership stops immediately, even if recursive=1. So I commented out line 107 (# if old==new: return) and it works. I mean the owner of the folder is changed as well as the contained objects, like stated in the method's docstring, whatever's the current folder owner. Any comment ? Is this a bug or did I miss something ? Ah yes, I run Zope 2.5.0 --Gilles
Hi, On Wed, Feb 20, 2002 at 06:56:59PM +0100, Gilles Lenfant wrote:
When trying to give (with an externat method) an authentified user the ownership of a folder and - recursively - its content, I noticed that when that folder is already owned by that user, the somefolder.changeOwnership(someuser, recursive=1) did not work on objects contained in that folder (always owned by the former owner).
I've already submitted several times the very same bug with a patch both to this list, zope-dev IIRC, and the Collector (don't remember which one ;-) I sincerely hope that your message will be read, because AFAICT mine wasn't ! bye, and GOOD LUCK !!! Jerome Alet
OOOPS ! here are the references for my previous message on this subject : http://zope.nipltd.com/public/lists/zope-archive.nsf/47ba74c812dbc5dd8025687... http://zope.nipltd.com/public/lists/zope-archive.nsf/47ba74c812dbc5dd8025687... It seems it never arrived to zope-dev though... bye, PS : Please ZC do something about this problem ! Jerome Alet
participants (2)
-
Gilles Lenfant -
Jerome Alet