Class NullRoleHierarchy
java.lang.Object
org.springframework.security.access.hierarchicalroles.NullRoleHierarchy
- All Implemented Interfaces:
RoleHierarchy
- Since:
- 3.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends GrantedAuthority>
getReachableGrantedAuthorities
(Collection<? extends GrantedAuthority> authorities) Returns an array of all reachable authorities.
-
Constructor Details
-
NullRoleHierarchy
public NullRoleHierarchy()
-
-
Method Details
-
getReachableGrantedAuthorities
public Collection<? extends GrantedAuthority> getReachableGrantedAuthorities(Collection<? extends GrantedAuthority> authorities) Description copied from interface:RoleHierarchy
Returns an array of all reachable authorities.Reachable authorities are the directly assigned authorities plus all authorities that are (transitively) reachable from them in the role hierarchy.
Example:
Role hierarchy: ROLE_A > ROLE_B > ROLE_C.
Directly assigned authority: ROLE_A.
Reachable authorities: ROLE_A, ROLE_B, ROLE_C.- Specified by:
getReachableGrantedAuthorities
in interfaceRoleHierarchy
- Parameters:
authorities
- - List of the directly assigned authorities.- Returns:
- List of all reachable authorities given the assigned authorities.
-