Commit 701bac05 authored by Jérome Perrin's avatar Jérome Perrin

AccessControl.Role.RoleManager class define a __ac_local_roles__ as None. So

this part fails when copy / pasting an unowned object.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13602 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c9681f6f
......@@ -240,7 +240,7 @@ class CopyContainer:
# Give the Owner local role to the current user, zope only does this if no
# local role has been defined on the object, which breaks ERP5Security
if getattr(self_base, '__ac_local_roles__', _marker) is not _marker:
if getattr(self_base, '__ac_local_roles__', None) is None:
user=getSecurityManager().getUser()
if user is not None:
userid=user.getId()
......
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