From 701bac05ed9f6c047f1d59aa4bb1c7aeab3d54da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Fri, 23 Mar 2007 17:42:20 +0000 Subject: [PATCH] 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 --- product/ERP5Type/CopySupport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product/ERP5Type/CopySupport.py b/product/ERP5Type/CopySupport.py index af667fff35..c09af8a391 100644 --- a/product/ERP5Type/CopySupport.py +++ b/product/ERP5Type/CopySupport.py @@ -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() -- 2.30.9