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

Feature/java 21 Merge Fence Branch #166

Merged
merged 9 commits into from
Jun 21, 2024
Prev Previous commit
Next Next commit
Update persistAll method to return list of roles
The persistAll method in RoleService.java has been revised to return a list of Role objects after saving them. This change is also reflected in FENCEAuthenticationService.java where the returned list of new roles is now properly assigned to newRoles.
Gcolon021 committed Jun 21, 2024
commit e06c51624d6ee3100dc5e32db10a7057702587bb
Original file line number Diff line number Diff line change
@@ -120,8 +120,8 @@ public Set<Role> getRolesByIds(Set<UUID> roleUuids) {
return this.roleRepository.findByUuidIn(roleUuids);
}

public void persistAll(List<Role> newRoles) {
this.roleRepository.saveAll(newRoles);
public List<Role> persistAll(List<Role> newRoles) {
return this.roleRepository.saveAll(newRoles);
}

public Role findByName(String roleName) {
Original file line number Diff line number Diff line change
@@ -237,7 +237,7 @@ public HashMap<String, String> getFENCEProfile(String callback_url, Map<String,
.collect(Collectors.toList());

if (!newRoles.isEmpty()) {
roleService.persistAll(newRoles);
newRoles = roleService.persistAll(newRoles);
current_user.getRoles().addAll(newRoles);
}