Class WarlockGrantServiceDummy
-
- All Implemented Interfaces:
-
pro.fessional.wings.warlock.service.grant.WarlockGrantService
public class WarlockGrantServiceDummy implements WarlockGrantService
- Since:
2022-07-11
trydofor
-
-
Constructor Summary
Constructors Constructor Description WarlockGrantServiceDummy()
-
Method Summary
Modifier and Type Method Description voidgrantRole(long roleId, @NotNull() GrantType type, @NotNull() Collection<Long> grant)Grant role/perm to role to give the `grant` privilege. voidpurgeRole(long roleId, @NotNull() GrantType type, @NotNull() Collection<Long> grant)Revoke role/perm to role to remove the `grant` privilege. voidgrantUser(long userId, @NotNull() GrantType type, @NotNull() Collection<Long> grant)Grant role/perm to user to give the `grant` privilege. voidpurgeUser(long userId, @NotNull() GrantType type, @NotNull() Collection<Long> grant)Revoke role/perm to user to remove the `grant` privilege. Map<Long, Set<Long>>entryUser(@NotNull() GrantType type, @NotNull() Collection<Long> userId)Get user granted privileges. Map<Long, Set<Long>>entryRole(@NotNull() GrantType type, @NotNull() Collection<Long> roleId)Get role granted privileges. -
-
Method Detail
-
grantRole
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
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
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
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
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
-
-
-
-