Commit 04bc8842 authored by Bartek Górny's avatar Bartek Górny

finding appropriate module for a portal_type in a security-aware way

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11750 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4dcbbaa4
......@@ -91,8 +91,11 @@ if doctype is None or doctype==\'\':\n
# create content\n
# find appropriate module\n
mod=None\n
modlist=[m for m in context.getPortalObject().contentValues() if m.getId().endswith(\'_module\')]\n
modlist=[m for m in context.getPortalObject().objectIds() if m.endswith(\'_module\')]\n
for mod in modlist:\n
mod=context.restrictedTraverse(mod,None)\n
if mod is None:\n
continue\n
if doctype in context.portal_types[mod.getPortalType()].allowed_content_types:\n
break\n
if mod is None:\n
......
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