Problems in updating ZClass instance property sheets
Hi, In general, the problems concerns updating properties in propertysheets belonging to certain ZClass. We have a dtml-document called "UserRegistration" and a python script called "registerUser". The dtml doc is a form that is filled in with user data. Then the script is called to proccess the data. We are using the standard acl_users for storage of user data. Because we want to have some additional information in the user object (and the acl_user can not be extended with more properties), we are using a product called "userinfo folder" found on www.zope.org. For each acl_user, there will be a zclass instance of UserInfo class in the userinfo folder. So when acl_users.manage_user(...) is run, a userinfo for this object will also be created. The problem appears when we want add the additional information in the userinfo object with the method manage_editProperties. The property belongs to a propertysheet. We get the following error message "you are not authorized to access propertysheets" even though our user is a manager with all rights. And the funny thing is that if we restart the server it executes one time but following attempts fail. The code that breaks looks like: Note that the data is in the request ======== # create the user and save user data context.acl_users.manage_users('Add', request) # save the additional properties for the user in its userinfo instance for object in container.data.user_info.objectValues('UserInfo'): if object.getId() == request.name: object.propertysheets.get('student').manage_editProperties(request) // student is the propertysheet name, it breaks here ======== We are running: Zope 2.4.1 beta 1 UserInfoFolder-1-0-0 http://www.zope.org/Members/did/UserInfoFolder on Windows NT ZClass UserInfo (UserInfo.zexp) and script and DTML-doc (createUser.zexp) are attached. hope you guys can help us. A UserInfoFolder data.user_info instance must be able to aquire in order to be able to execute the code. The entry point is the "userRegistration" DTML Document. /Johan Parmar and Per Hörnfeldt <<createUser.zexp>> <<UserInfo.zexp>> _ _ _ _ _ __________________________ _ _ _ _ _ - - - - ReachIn ---------------------- - - - - ¯ ¯ ¯ ¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯ ¯ ¯ Per Hörnfeldt Reachin Technologies AB Årstaängsvägen 24 117 43 Stockholm Sweden Direct: +46 (8) 556 766 19 Phone: +46 (8) 556 766 00 Fax: +46 (8) 556 766 01 mailto:per.hornfeldt@reachin.se Web: www.reachin.se
participants (2)
-
Dieter Maurer -
Per Hörnfeldt