Ignoring non d4s roles when removing from user
This commit is contained in:
parent
84531d5f8e
commit
14fbdd6fcf
|
@ -159,7 +159,10 @@ public class UserSitesToGroupsAndRolesMapper {
|
|||
log.info("Checking actual roles in the site's group");
|
||||
for (String gcRoleName : actualSiteGroupRoles) {
|
||||
String actualSiteName = actualSite.getName();
|
||||
if (!actualSite.getRoles().contains(gcRoleName)) {
|
||||
// 'D4ScienceMappings.Role.valueOf(gcRoleName) != null' is used to be sure that is a d4s role and not
|
||||
// a Liferay role that must be let as it is
|
||||
if (D4ScienceMappings.Role.valueOf(gcRoleName) != null
|
||||
&& !actualSite.getRoles().contains(gcRoleName)) {
|
||||
try {
|
||||
log.info("Removing '" + gcRoleName + "' user's role for site: " + actualSiteName);
|
||||
roleManager.removeRoleFromUser(user.getUserId(), actualSiteGroupId,
|
||||
|
|
Loading…
Reference in New Issue