public class InMemoryPermissionManager extends Object implements PermissionManager
PermissionManager.| Constructor and Description |
|---|
InMemoryPermissionManager(org.apache.shiro.authz.permission.PermissionResolver permissionResolver) |
| Modifier and Type | Method and Description |
|---|---|
Iterable<Map.Entry<String,Set<org.apache.shiro.authz.Permission>>> |
getAll()
Gets all roles with permissions attached.
|
Set<org.apache.shiro.authz.Permission> |
getAllForRole(String role)
Gets all permissions granted to this role.
|
org.apache.shiro.authz.permission.PermissionResolver |
getPermissionResolver()
Gets the permission resolver for this manager.
|
void |
reset() |
void |
revokeAllForRole(String role)
Revokes all permissions for a role.
|
void |
updateForRole(String role,
PermissionUpdateRequest updates)
Updates the permissions for a role.
|
public InMemoryPermissionManager(org.apache.shiro.authz.permission.PermissionResolver permissionResolver)
public Set<org.apache.shiro.authz.Permission> getAllForRole(String role)
PermissionManagerMultimap.get(Object)getAllForRole in interface PermissionManagerpublic void updateForRole(String role, PermissionUpdateRequest updates)
PermissionManagerupdateForRole in interface PermissionManagerpublic void revokeAllForRole(String role)
PermissionManagerrevokeAllForRole in interface PermissionManagerpublic Iterable<Map.Entry<String,Set<org.apache.shiro.authz.Permission>>> getAll()
PermissionManagerPermissionManager.getAllForRole(String) for that role.
Note that if a role is in use but has no permissions attached then it is up to the implementation whether
to include a record with an empty set of permissions or omit the record entirely.getAll in interface PermissionManagerpublic org.apache.shiro.authz.permission.PermissionResolver getPermissionResolver()
PermissionManagergetPermissionResolver in interface PermissionManagerpublic void reset()
Copyright © 2016. All Rights Reserved.