Commit b823ef21 authored by Romain Courteaud's avatar Romain Courteaud

Do not paste objects if the portal type is not visible

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18824 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b57eacce
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -81,7 +78,7 @@ if context.cb_dataValid:\n
except AttributeError:\n
error_message = N_(\'Sorry+you+can+not+paste+theses+Items+here\')\n
else:\n
allowed_type_list = [x.id for x in context.allowedContentTypes()]\n
allowed_type_list = [x.id for x in context.getVisibleAllowedContentTypeList()]\n
for portal_type in portal_type_list:\n
if portal_type not in allowed_type_list:\n
error_message = N_(\'Sorry+you+can+not+paste+theses+Items+here\')\n
......
679
\ No newline at end of file
680
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment