|
static TreeSet | ON_SET = new TreeSet<>(Set.of("on")) |
|
- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 36 of file Permissions.java.
◆ Permissions()
org.turro.security.Permissions.Permissions |
( |
| ) |
|
|
protected |
◆ from()
static FlatPermissions org.turro.security.Permissions.from |
( |
Set< String > |
securityGroups | ) |
|
|
static |
Definition at line 40 of file Permissions.java.
41 FlatPermissions permissions =
new FlatPermissions();
42 securityGroups.forEach(sg -> {
43 SecurityGroup securityGroup = SecurityGroups.get(sg);
44 flatten(securityGroup, permissions);
◆ getRoleNames() [1/2]
static Set<String> org.turro.security.Permissions.getRoleNames |
( |
| ) |
|
|
static |
◆ getRoleNames() [2/2]
static Set<String> org.turro.security.Permissions.getRoleNames |
( |
Set< String > |
securityGroups | ) |
|
|
static |
Definition at line 81 of file Permissions.java.
82 return securityGroups.stream().flatMap(sg -> SecurityGroups.get(sg).getRoles().stream()).collect(Collectors.toSet());
◆ getRoleNamesByPermission()
static Set<String> org.turro.security.Permissions.getRoleNamesByPermission |
( |
String |
role | ) |
|
|
static |
Definition at line 85 of file Permissions.java.
86 String parts[] = role.split(
":");
87 Set<String>
set =
new HashSet<>();
89 rm.getValue().getRolePermissions().entrySet().forEach(permission -> {
90 if(permission.getKey().equals(parts[0])) {
91 if(parts.length == 2 && permission.getValue().contains(parts[1])) {
92 set.add(rm.getValue().getName());
94 set.add(rm.getValue().getName());
◆ getSecurityGroupIdsBy()
static Set<String> org.turro.security.Permissions.getSecurityGroupIdsBy |
( |
String |
role | ) |
|
|
static |
Definition at line 64 of file Permissions.java.
65 if(role.contains(
":")) {
67 return SecurityGroups.getAll().stream()
68 .filter(sg -> sg.getRoles().stream().anyMatch(r -> roleNames.contains(r)))
69 .map(sg -> sg.getId()).collect(Collectors.toSet());
71 return SecurityGroups.getAll().stream()
72 .filter(sg -> sg.getRoles().contains(role))
73 .map(sg -> sg.getId()).collect(Collectors.toSet());
static Set< String > getRoleNamesByPermission(String role)
◆ instance()
static Permissions org.turro.security.Permissions.instance |
( |
| ) |
|
|
static |
◆ permissionStringMap()
static SortedMap<String, SortedSet<String> > org.turro.security.Permissions.permissionStringMap |
( |
| ) |
|
|
static |
Definition at line 104 of file Permissions.java.
105 SortedMap<String, SortedSet<String>> map =
new TreeMap<>();
107 SortedSet<String>
set =
new TreeSet<>();
108 role.getValue().getRolePermissions().entrySet().forEach(permission -> {
109 set.add(permission.getKey() +
": " + permission.getValue().stream().collect(Collectors.joining(
", ")));
111 map.put(role.getKey(),
set);
◆ reset()
static void org.turro.security.Permissions.reset |
( |
| ) |
|
|
static |
◆ ON_SET
TreeSet org.turro.security.Permissions.ON_SET = new TreeSet<>(Set.of("on")) |
|
static |
◆ roleMaps
final TreeMap<String, RoleMap> org.turro.security.Permissions.roleMaps |
|
protected |
The documentation for this class was generated from the following file: