Re: [Zope] 'Owner' not being set. (fwd)
Sorry, I've forgotten the CC ---------- Forwarded message ---------- Date: Wed, 11 Jul 2001 15:20:57 +0200 (MET DST) From: Jerome Alet <jerome@cortex.unice.fr> To: Dave Smithson <dave.smithson@runningdog.co.uk> Subject: Re: [Zope] 'Owner' not being set. On Wed, 11 Jul 2001, Dave Smithson wrote:
Problem in short: information regarding a book which is uploaded into "example's" book section is also appearing in "example2's" book section. The resulting 'book' object is being added to the correct folder, and the zCatalog seems to be picking up the right metadata - except for the 'owner'. (See screengrabs at http://d029.ml.uwcm.ac.uk:8080/imi_test/screengrab). We don't think the 'owner' is getting set using the following code *, which is from the zc_book_add (zc_book constructor):
there's a bug in changeOwnership which I've already reported both in the collector and in zope-dev, without luck it seems. the owner is incorrectly set when used recursively if you already own the root of the subtree. could this be the same bug ? I don't know at all if this is the case, but if yes then here's the solution: remove line 171 in AccessControl/Owned.py in Zope 2.3.2 and restart Zope. hoping this helps bye, Jerome Alet
Dear Jerome / All,
the owner is incorrectly set when used recursively if you already own the root of the subtree. remove line 171 in AccessControl/Owned.py in Zope 2.3.2
Thanks. Commented out line 171, which I took as ( # if old==new: turn ), but a 'book' loaded into 'example' still comes out in 'example' and 'example2'. My description in my first post was also incorrect:
...and the zCatalog seems to be picking up the right metadata - except for the 'owner'. (See screengrabs at http://d029.ml.uwcm.ac.uk:8080/imi_test/screengrab). We don't think the 'owner' is getting set using the following code *, which is from the zc_book_add (zc_book constructor):
* <dtml-call "REQUEST.set('Owner',AUTHENTICATED_USER.getUserName())">
as 'owner' should read 'Owner'. My mistake. Hm. However, if I did change the right line in Owned.py, I still seem to have the problem. If this doesn't look right, please give me a prod. Any other ideas would be very gratefully accepted. My regards, Dave. David Smithson Information Designer Media Resources Centre University of Wales College of Medicine Cardiff UK
participants (2)
-
Dave Smithson -
Jerome Alet