Commit e13e1695 authored by Yusei Tahara's avatar Yusei Tahara

Get security group id generation script from parent instead of object itself.

This prevents wrong acquisition problem on a portal site like document.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18599 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8e51a31a
...@@ -570,9 +570,11 @@ class ERP5TypeInformation( FactoryTypeInformation, ...@@ -570,9 +570,11 @@ class ERP5TypeInformation( FactoryTypeInformation,
# Generate security group ids from category_value_dicts # Generate security group ids from category_value_dicts
role_group_id_dict = {} role_group_id_dict = {}
group_id_generator = getattr( ob, parent = ob.aq_parent
group_id_generator = getattr( parent,
ERP5TYPE_SECURITY_GROUP_ID_GENERATION_SCRIPT, ERP5TYPE_SECURITY_GROUP_ID_GENERATION_SCRIPT,
None ) None )
group_id_generator = group_id_generator.__of__(ob)
if group_id_generator is None: if group_id_generator is None:
raise RuntimeError, '%s script was not found' % \ raise RuntimeError, '%s script was not found' % \
ERP5TYPE_SECURITY_GROUP_ID_GENERATION_SCRIPT ERP5TYPE_SECURITY_GROUP_ID_GENERATION_SCRIPT
......
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