Skip to content

Commit

Permalink
Merge pull request #102 from devondragon:issue-99-Fix-RoleHierarchyIm…
Browse files Browse the repository at this point in the history
…pl-Deprecation-Warnings-in-WebSecurityConfig

chore: Refactor roleHierarchy method in WebSecurityConfig
  • Loading branch information
devondragon authored Jul 1, 2024
2 parents e7d60f2 + 362f5ca commit e87c6c4
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,7 @@ public SessionRegistry sessionRegistry() {

@Bean
public RoleHierarchy roleHierarchy() {
RoleHierarchyImpl roleHierarchy = new RoleHierarchyImpl();
roleHierarchy.setHierarchy(rolesAndPrivilegesConfig.getRoleHierarchyString());
RoleHierarchyImpl roleHierarchy = RoleHierarchyImpl.fromHierarchy(rolesAndPrivilegesConfig.getRoleHierarchyString());
log.debug("WebSecurityConfig.roleHierarchy: roleHierarchy: {}", roleHierarchy.toString());
return roleHierarchy;
}
Expand All @@ -246,7 +245,7 @@ public HttpSessionEventPublisher httpSessionEventPublisher() {
/**
* This is required to publish authentication events to the Spring event system. This allows us to listen for authentication events and perform
* actions based on successful or failed authentication.
*
*
* @param applicationEventPublisher
* @return the Spring Security default AuthenticationEventPublisher
*/
Expand Down

0 comments on commit e87c6c4

Please sign in to comment.