public final class

NullRoleHierarchy

extends Object
implements RoleHierarchy
java.lang.Object
   ↳ org.springframework.security.access.hierarchicalroles.NullRoleHierarchy

Summary

Public Constructors
NullRoleHierarchy()
Public Methods
Collection<? extends GrantedAuthority> getReachableGrantedAuthorities(Collection<? extends GrantedAuthority> authorities)
Returns an array of all reachable authorities.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.security.access.hierarchicalroles.RoleHierarchy

Public Constructors

public NullRoleHierarchy ()

Public Methods

public Collection<? extends GrantedAuthority> getReachableGrantedAuthorities (Collection<? extends GrantedAuthority> authorities)

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 and ROLE_B > ROLE_C.
Directly assigned authority: ROLE_A.
Reachable authorities: ROLE_A, ROLE_B, ROLE_C.

Parameters
authorities - List of the directly assigned authorities.
Returns
  • List of all reachable authorities given the assigned authorities.