diff --git a/product/ERP5Type/Base.py b/product/ERP5Type/Base.py index 1eb79e428110d4ee65c55e11e40c7b811694ea29..cf5f63d0d4a09409b951e6c9500668e270a0b159 100755 --- a/product/ERP5Type/Base.py +++ b/product/ERP5Type/Base.py @@ -1287,6 +1287,17 @@ class Base( CopyContainer, PortalContent, Base18, ActiveObject, ERP5PropertyMana local_permission_list += ((permission,permission_role),) return local_permission_list + security.declareProtected(Permissions.View, 'get_local_permissions') + def manage_setLocalPermissions(self,permission,local_permission_list=None): + """ + This works like manage_setLocalRoles. It allows to set all + permissions defined locally + """ + permission_name = pname(permission) + if local_permission_list is None: + delattr(self,permission_name) + else: + setattr(self,permission_name,local_permission_list) class TempBase(Base): """