Interface WarlockGrantService
-
- All Implemented Interfaces:
public interface WarlockGrantServiceAuthorization and revocation, which involves elevation of privilege, must be used with GrantChecker - Role-owned perm - Role-owned role - User-owned perm - user-owned role- Since:
2021-03-05
trydofor
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumWarlockGrantService.Jane
-
Method Summary
Modifier and Type Method Description abstract voidgrantRole(long roleId, @NotNull() GrantType type, @NotNull() Collection<Long> grant)Grant role/perm to role to give the `grant` privilege. voidgrantRole(long refer, @NotNull() GrantType type, @NotNull() Array<Long> grant)abstract voidpurgeRole(long roleId, @NotNull() GrantType type, @NotNull() Collection<Long> grant)Revoke role/perm to role to remove the `grant` privilege. voidpurgeRole(long roleId, @NotNull() GrantType type, @NotNull() Array<Long> grant)abstract voidgrantUser(long userId, @NotNull() GrantType type, @NotNull() Collection<Long> grant)Grant role/perm to user to give the `grant` privilege. voidgrantUser(long userId, @NotNull() GrantType type, @NotNull() Array<Long> grant)abstract voidpurgeUser(long userId, @NotNull() GrantType type, @NotNull() Collection<Long> grant)Revoke role/perm to user to remove the `grant` privilege. voidpurgeUser(long userId, @NotNull() GrantType type, @NotNull() Array<Long> grant)abstract Map<Long, Set<Long>>entryUser(@NotNull() GrantType type, @NotNull() Collection<Long> userId)Get user granted privileges. Map<Long, Set<Long>>entryUser(@NotNull() GrantType type, @NotNull() Array<Long> userId)abstract Map<Long, Set<Long>>entryRole(@NotNull() GrantType type, @NotNull() Collection<Long> roleId)Get role granted privileges. Map<Long, Set<Long>>entryRole(@NotNull() GrantType type, @NotNull() Array<Long> roleId)-
-
Method Detail
-
grantRole
abstract void grantRole(long roleId, @NotNull() GrantType type, @NotNull() Collection<Long> grant)
Grant role/perm to role to give the `grant` privilege.
- Parameters:
roleId- roleIdtype- grant typegrant- RoleId or PermId
-
purgeRole
abstract void purgeRole(long roleId, @NotNull() GrantType type, @NotNull() Collection<Long> grant)
Revoke role/perm to role to remove the `grant` privilege.
- Parameters:
roleId- roleIdtype- grant typegrant- RoleId or PermId
-
grantUser
abstract void grantUser(long userId, @NotNull() GrantType type, @NotNull() Collection<Long> grant)
Grant role/perm to user to give the `grant` privilege.
- Parameters:
userId- userIdtype- grant typegrant- RoleId or PermId
-
purgeUser
abstract void purgeUser(long userId, @NotNull() GrantType type, @NotNull() Collection<Long> grant)
Revoke role/perm to user to remove the `grant` privilege.
- Parameters:
userId- userIdtype- grant typegrant- RoleId or PermId
-
entryUser
abstract Map<Long, Set<Long>> entryUser(@NotNull() GrantType type, @NotNull() Collection<Long> userId)
Get user granted privileges. return the map of RoleId/PermId to UserId
- Parameters:
type- grant typeuserId- userId- Returns:
RoleId/PermId - UserId
-
entryRole
abstract Map<Long, Set<Long>> entryRole(@NotNull() GrantType type, @NotNull() Collection<Long> roleId)
Get role granted privileges. return the map of RoleId/PermId to UserId
- Parameters:
type- grant typeroleId- roleId- Returns:
RoleId/PermId - roleId
-
-
-
-