Skip to content

Add convenience method for constructing RoleHierarchy from Map #3990

@thomasdarimont

Description

@thomasdarimont

Summary

Currently a RoleHierarchy needs to be constructed by creating a RoleHierarchyImpl which
interprets a string based definition of a role hierarchy.
Since this mapping only maps a role to a list of implied roles this could also be backed by a simple map.

It would be great if spring security would ship with method of constructing a RoleHierarchy from a
map which would nicely fit with a yaml based configuration approach which can be seen in the provided example.

Sample

See: https://gist.github.com/thomasdarimont/ee9fffdef1adb9243b12ad247478aad4

Metadata

Metadata

Assignees

Labels

in: coreAn issue in spring-security-coretype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions