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 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<string>Products.PythonScripts.PythonScript</string> <tuple/>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -81,7 +78,7 @@ if context.cb_dataValid:\n ...@@ -81,7 +78,7 @@ if context.cb_dataValid:\n
except AttributeError:\n except AttributeError:\n
error_message = N_(\'Sorry+you+can+not+paste+theses+Items+here\')\n error_message = N_(\'Sorry+you+can+not+paste+theses+Items+here\')\n
else:\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 for portal_type in portal_type_list:\n
if portal_type not in allowed_type_list:\n if portal_type not in allowed_type_list:\n
error_message = N_(\'Sorry+you+can+not+paste+theses+Items+here\')\n error_message = N_(\'Sorry+you+can+not+paste+theses+Items+here\')\n
......
679 680
\ No newline at end of file \ 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