[Zope] Python script and proxy roles
Kristofer Bengtsson
hammok@hotmail.com
Thu, 12 Sep 2002 09:00:52 +0200
Hi
I have problems when I try to run a script with proxy roles as Manager. It's
working just fine when I am a Manager but when I log in as a member it will
not work. Is the proxy roles just work in that folder? I use zope 2.5.1, CMF
1.3 and Plone 1.0a1. The script is copying a folder in a parent folder. The
script is below:
# Getting variables from request and fixing the url
REQUEST=context.REQUEST
proj_id=REQUEST['proj_id']
proj_title=REQUEST['proj_title']
proj_url=context.portal_url() + '/projects/' + proj_id + '/'
# The object to copy
clone_obj=context.projects.proj1
# Adding a new project folder from clone_obj. Adding Title
Obj=context.projects.manage_clone(clone_obj,proj_id)
Obj.manage_changeProperties(title=proj_title)
# Fixing the project link
link=Obj.link.objectValues()
for i in link:
i.manage_changeProperties(title=proj_title,link_url=proj_url)
return context.projects.portalManage.index_html( context, REQUEST )
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com