I have a content type and I want to assign local roles 'Contributor','Reader' based on a field but is not working, I can't figure what's wrong
I tried:
def assignRole(self):
deptGroup = 'cs-'+ str(self.croACAD_ORG) + '-grp'
self.manage_setLocalRoles(deptGroup, ['Contributor','Reader'])
self.reindexObjectSecurity()
and
def assignRole(self):
deptGroup = 'cs-'+ str(self.croACAD_ORG) + '-grp'
deptGroup = 'cs-grp'
api.user.grant_roles(username=deptGroup,roles=['Contributor', 'Editor'],)