diff --git a/plugins/admin-ui-plugin/src/main/java/io/jans/ca/plugin/adminui/service/user/UserManagementService.java b/plugins/admin-ui-plugin/src/main/java/io/jans/ca/plugin/adminui/service/user/UserManagementService.java index 3e773ed0db2..9d7902065da 100644 --- a/plugins/admin-ui-plugin/src/main/java/io/jans/ca/plugin/adminui/service/user/UserManagementService.java +++ b/plugins/admin-ui-plugin/src/main/java/io/jans/ca/plugin/adminui/service/user/UserManagementService.java @@ -251,7 +251,6 @@ public List addPermissionsToRole(RolePermissionMapping ro entryManager.merge(adminConf); return adminConf.getDynamic().getRolePermissionMapping(); } catch (ApplicationException e) { - log.error(e.getMessage()); throw e; } catch (Exception e) { log.error(ErrorResponse.ERROR_IN_MAPPING_ROLE_PERMISSION.getDescription(), e); @@ -287,14 +286,9 @@ public List mapPermissionsToRole(RolePermissionMapping ro } Optional rolePermissionMappingOptional = roleScopeMappingList.stream().findFirst(); - List mappedPermissions = Lists.newArrayList(); - if (rolePermissionMappingOptional.isPresent()) { - mappedPermissions = rolePermissionMappingOptional.get().getPermissions(); - } //remove duplicate permissions Set scopesSet = new LinkedHashSet<>(rolePermissionMappingArg.getPermissions()); - //scopesSet.addAll(rolePermissionMappingArg.getPermissions()); List combinedScopes = new ArrayList<>(scopesSet); if (adminConf.getDynamic().getRolePermissionMapping() @@ -311,7 +305,6 @@ public List mapPermissionsToRole(RolePermissionMapping ro entryManager.merge(adminConf); return adminConf.getDynamic().getRolePermissionMapping(); } catch (ApplicationException e) { - log.error(e.getMessage()); throw e; } catch (Exception e) { log.error(ErrorResponse.ERROR_IN_MAPPING_ROLE_PERMISSION.getDescription(), e);