◆ addPermissions()
void org.turro.security.FlatPermissions.addPermissions |
( |
TreeMap< String, TreeSet< String >> |
rolePermissions | ) |
|
Definition at line 51 of file FlatPermissions.java.
52 rolePermissions.entrySet().forEach(entry -> {
53 TreeSet<String>
set =
get(entry.getKey());
54 if(
set ==
null)
set =
new TreeSet<>();
55 set.addAll(entry.getValue());
56 put(entry.getKey(),
set);
◆ anyKeyMatch()
boolean org.turro.security.FlatPermissions.anyKeyMatch |
( |
List< String > |
roles | ) |
|
Definition at line 43 of file FlatPermissions.java.
44 return roles.stream().anyMatch(role -> containsKey(role));
◆ asMap()
◆ isActor()
boolean org.turro.security.FlatPermissions.isActor |
( |
IContact |
contact, |
|
|
String |
actor |
|
) |
| |
|
protected |
Definition at line 60 of file FlatPermissions.java.
61 if(contact ==
null) contact = (IContact) Application.getUser();
62 return Actors.isActor(contact, actor);
◆ isInRole()
boolean org.turro.security.FlatPermissions.isInRole |
( |
String |
role | ) |
|
Definition at line 35 of file FlatPermissions.java.
36 String[] roles = role.split(
"\\s*\\|\\s*");
37 for(String r : roles) {
38 if(checkRole(r))
return true;
The documentation for this class was generated from the following file: