Commit d63133c5 authored by Sebastien Robin's avatar Sebastien Robin

added a method in order to set local roles


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1143 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fc299dd5
......@@ -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):
"""
......
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