I am facing some wierd problem with Roles.
When I assign some Organization Role to the some user using this api
UserGroupRoleLocalServiceUtil.addUserGroupRoles(long userId, long groupId, long roleIds)
, this works fine.
But after this when I assign some Regular Role to the same user using below api
, I am facing problem here.
The problem what happens is that the Regular Role is getting assigned to the User, but the previously added Organization Role goes away.
This is not replicating when done from Control Panel UI. I checked EditUserAction.java, there the method used for updating roles is the updateUser(....)
I think this is the bug.