[Erp5-report] r18813 - in /erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style: SkinTemplat...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jan 22 11:13:22 CET 2008
Author: romain
Date: Tue Jan 22 11:13:22 2008
New Revision: 18813
URL: http://svn.erp5.org?rev=18813&view=rev
Log:
Check if the user is allowed to clone the document.
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_createCloneDocument.xml
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_createCloneDocument.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_createCloneDocument.xml?rev=18813&r1=18812&r2=18813&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_createCloneDocument.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_createCloneDocument.xml Tue Jan 22 11:13:22 2008
@@ -81,6 +81,14 @@
portal_type = context.getPortalType()\n
else:\n
portal_type = form_data[\'clone_portal_type\']\n
+\n
+parent = context.getParentValue()\n
+allowed_type_list = parent.getVisibleAllowedContentTypeList()\n
+if portal_type not in allowed_type_list:\n
+ return context.ERP5Site_redirect(\'%s/%s/view\' % (\n
+ parent.getUrl(), context.getId()),\n
+ keep_items={\'portal_status_message\':\n
+ translateString("You are not allowed to clone this object.")})\n
\n
# prepare query params\n
kw = {\'portal_type\' : portal_type}\n
@@ -162,6 +170,8 @@
<string>form_data</string>
<string>portal_type</string>
<string>_getitem_</string>
+ <string>parent</string>
+ <string>allowed_type_list</string>
<string>kw</string>
<string>getattr</string>
<string>None</string>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision?rev=18813&r1=18812&r2=18813&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision Tue Jan 22 11:13:22 2008
@@ -1,1 +1,1 @@
-484
+485
More information about the Erp5-report
mailing list