Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOSIP-37258 #1666

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ public static String getproperty(String key) {
public static String getRolesForUser(String userId) {
return getproperty("roles." + userId);
}

public static String getRolesForUser() {
return getproperty("roles");
}

public static String getServerErrorsToMonitor() { return getproperty("serverErrorsToMonitor"); }
public static String getEnableDebug() { return getproperty("enableDebug"); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ public static void createUsers(String userid, String pwd, String rolenum, Map<St

List<RoleRepresentation> allRoles = realmResource.roles().list();
List<RoleRepresentation> availableRoles = new ArrayList<>();
List<String> toBeAssignedRoles = List.of(propsKernel.getProperty(rolenum).split(","));
List<String> toBeAssignedRoles = List.of(ConfigManager.getRolesForUser().split(","));
for (String role : toBeAssignedRoles) {
if (allRoles.stream().anyMatch((r -> r.getName().equalsIgnoreCase(role)))) {
if (allRoles.stream().filter(r->r.getName().equals(role)).findFirst().isPresent())
Expand Down
Loading