[Zope] 'Owner' not being set.

Dave Smithson Dave Smithson" <dave.smithson@runningdog.co.uk
Wed, 11 Jul 2001 14:04:14 +0100


Dear All,

I'm an information designer, and have been working with our programmer on a
project. The url is:

http://d029.ml.uwcm.ac.uk:8080/imi_test

zClasses and forms have been set up to allow contributors to upload
information regarding books, journals, etc, which belong to them. This
information should then appear in the relevant area.

To upload their information, users navigate to their folders, eg.

http://d029.ml.uwcm.ac.uk:8080/imi_test/browse_by_contributor/example/book
or
http://d029.ml.uwcm.ac.uk:8080/imi_test/browse_by_contributor/example2/book

and upload their material using the 'Add book' link/form. (username/password
for 'example' is example/example, and username/password for 'example2' is
example2/example2.

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):

*

<html>
<head><title>Add zc_book</title></head>
<body bgcolor="#FFFFFF" link="#000099" vlink="#555555">

<dtml-call "REQUEST.set('Owner',AUTHENTICATED_USER.getUserName())">
<dtml-with "zc_book.createInObjectManager(REQUEST['id'], REQUEST)">

<dtml-call "REQUEST.set('prop',propertysheets.get('book_properties'))">
<dtml-call "prop.manage_editProperties(REQUEST)">
<dtml-call reindex_object>

</dtml-with>

<dtml-if DestinationURL>
  <dtml-call "RESPONSE.redirect(DestinationURL+'/manage_workspace')">
<dtml-else>
  <dtml-call "RESPONSE.redirect(URL2+'/manage_workspace')">
</dtml-if>

</body></html>


Roles: 'example' has a local manager role set in the base 'example' folder.
'example2' also has a local manager role in the 'example2' folder. Both of
these have been added into an acl_users folder in the root of the site.

Am suitably stumped, and would be very grateful for any pointers.

tia,

Dave.

David Smithson
Information Designer
Media Resources Centre
University of Wales College of Medicine
Cardiff UK