Commit b97a091e authored by Sebastien Robin's avatar Sebastien Robin

correct bug with empty list of permissions


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1146 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6903756f
......@@ -1040,13 +1040,17 @@ class ERP5Conduit(XMLSyncUtilsMixin):
"""
conflict_list = []
# We want to add a local role
LOG('addLocalPermissionNode, xml',0,xml)
if len(xml.childNodes)>0:
roles = self.convertXmlValue(xml.childNodes[0].data,data_type='tokens')
else:
roles = None
permission = self.getAttribute(xml,'id')
roles = list(roles) # Needed for CPS, or we have a CPS error
LOG('local_role: ',0,'permission: %s roles: %s' % (repr(permission),repr(roles)))
#user = roles[0]
#roles = roles[1:]
if xml.nodeName.find(self.local_permission_tag)>=0:
roles = list(roles) # Needed for CPS, or we have a CPS error
object.manage_setLocalPermissions(permission,roles)
return conflict_list
......
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