Hello, I have two problems with manage_clone(): I want users to add folders and documents. It seems that the use of manage_clone() is only allowed to managers. How can I authorize a user without "AUTHENTICATED_USER.has_role('Manager')" to use this method? I haven't found an appropriate ceckbox on the security pages. Second, how can I parameterize the location where the clones will be added? For the moment my solution is to copy the document that calls the manage_clone() method to the destination folder for the clones... TIA, Andreas ********************************************************************** This email message has been swept by MIMEsweeper for the presence of computer viruses. Francotyp-Postalia AG & Co.
On Tue, 4 Apr 2000 a.wacknitz@francotyp.com wrote:
manage_clone() is only allowed to managers. How can I authorize a user without "AUTHENTICATED_USER.has_role('Manager')" to use this method? I
You want to give your method that calls manage_clone a "proxy" role of manager.
haven't found an appropriate ceckbox on the security pages.
Check out the "Proxy" tab instead.
Second, how can I parameterize the location where the clones will be added? For the moment my solution is to copy the document that calls the manage_clone() method to the destination folder for the clones...
I think you need some dtml-with magic here, but I haven't done this myself yet so I'll leave it for someone else to answer. --RDM
a.wacknitz@francotyp.com wrote:
Second, how can I parameterize the location where the clones will be added? For the moment my solution is to copy the document that calls the manage_clone() method to the destination folder for the clones...
Let's say you have a string property or dtml-let that assigns a folder id to "newhome". <dtml-with _[newhome]> <dtml-call manage_clone()> </dtml-with> If you need it to be deeper, you can do <dtml-with _[someroot]._[somefolder]._[somehome]> but that may need to be <dtml-with "_[someroot]._[somefolder]._[somehome]"> Check the "namespaces howto" for more information on _[] and other wierdness You probably want to wrap that in a <dtml-if>, because if "newhome" doesn't exist, you'll get an error. -- ethan mindlace fremen mindlace@imeme.net zope -&- imap email -&- mailing list weave your web with the web at http://imeme.net
participants (3)
-
a.wacknitz@francotyp.com -
mindlace -
R. David Murray