public interface PermissionService
| Modifier and Type | Method and Description |
|---|---|
List<String> |
fetchPermissionsForHistoricScope(String scopeId,
boolean checkWritePermissionInParent,
String userId,
Set<String> groupKeys,
String tenantId) |
List<String> |
fetchPermissionsForHistoricScope(String scopeId,
String userId,
Set<String> groupKeys,
String tenantId) |
List<String> |
fetchPermissionsForRuntimeScope(String scopeId,
boolean checkWritePermissionInParent,
String userId,
Set<String> groupKeys,
String tenantId) |
List<String> |
fetchPermissionsForRuntimeScope(String scopeId,
String userId,
Set<String> groupKeys,
String tenantId) |
String |
getScopeType()
The scope type that this permissions service supports.
|
boolean |
hasPermissionForHistoricScope(String permission,
String scopeId,
String userId,
Set<String> groupKeys,
String tenantId) |
boolean |
hasPermissionForRuntimeScope(String permission,
String scopeId,
String userId,
Set<String> groupKeys,
String tenantId) |
boolean |
hasPermissionForScope(String permission,
String scopeId,
String userId,
Set<String> groupKeys,
String tenantId) |
boolean |
hasReadPermissionOnScopeDefinition(String scopeDefinitionId,
String scopeDefinitionKey,
String userId,
Set<String> groupKeys,
String tenantId) |
default void |
validatePermissionForHistoricScope(String permission,
String scopeId,
String userId,
Set<String> groupKeys,
String tenantId) |
default void |
validatePermissionForRuntimeScope(String permission,
String scopeId,
String userId,
Set<String> groupKeys,
String tenantId) |
default void |
validatePermissionForScope(String permission,
String scopeId,
String userId,
Set<String> groupKeys,
String tenantId)
Validate the permission for the given scoped object with
scopeId for the userId with the given groupKeys. |
default void |
validatePermissionsForHistoricScope(Set<String> permissions,
String scopeId,
String userId,
Set<String> groupKeys,
String tenantId) |
default void |
validatePermissionsForRuntimeScope(Set<String> permissions,
String scopeId,
String userId,
Set<String> groupKeys,
String tenantId) |
default void |
validateReadPermissionOnScopeDefinition(String scopeDefinitionId,
String scopeDefinitionKey,
String userId,
Set<String> groupKeys,
String tenantId)
Validation the permissions for the given scoped definition object with
scopeDefinitionId for the userId with the given groupKeys. |
String getScopeType()
default void validatePermissionForScope(String permission, String scopeId, String userId, Set<String> groupKeys, String tenantId)
scopeId for the userId with the given groupKeys.
If the permissions service can distinguish between runtime and historic objects then this validation should determine the type of the
scoped object and perform a check against that.
NB: This should only be used if the type is not known in advance.
The validatePermissionForRuntimeScope(String, String, String, Set, String) or validatePermissionForHistoricScope(String, String, String, Set, String)
should be preferred instead.
permission - the permission that needs to be checkedscopeId - the id of the scoped object that needs to be checkeduserId - the id of the user for which the validation needs to be donegroupKeys - the group keys of the user for which the validation needs to be donetenantId - the tenant id of the user for which the validation needs to be doneboolean hasPermissionForScope(String permission, String scopeId, String userId, Set<String> groupKeys, String tenantId)
default void validatePermissionForRuntimeScope(String permission, String scopeId, String userId, Set<String> groupKeys, String tenantId)
default void validatePermissionsForRuntimeScope(Set<String> permissions, String scopeId, String userId, Set<String> groupKeys, String tenantId)
boolean hasPermissionForRuntimeScope(String permission, String scopeId, String userId, Set<String> groupKeys, String tenantId)
List<String> fetchPermissionsForRuntimeScope(String scopeId, String userId, Set<String> groupKeys, String tenantId)
List<String> fetchPermissionsForRuntimeScope(String scopeId, boolean checkWritePermissionInParent, String userId, Set<String> groupKeys, String tenantId)
default void validatePermissionForHistoricScope(String permission, String scopeId, String userId, Set<String> groupKeys, String tenantId)
default void validatePermissionsForHistoricScope(Set<String> permissions, String scopeId, String userId, Set<String> groupKeys, String tenantId)
boolean hasPermissionForHistoricScope(String permission, String scopeId, String userId, Set<String> groupKeys, String tenantId)
List<String> fetchPermissionsForHistoricScope(String scopeId, String userId, Set<String> groupKeys, String tenantId)
List<String> fetchPermissionsForHistoricScope(String scopeId, boolean checkWritePermissionInParent, String userId, Set<String> groupKeys, String tenantId)
default void validateReadPermissionOnScopeDefinition(String scopeDefinitionId, String scopeDefinitionKey, String userId, Set<String> groupKeys, String tenantId)
scopeDefinitionId for the userId with the given groupKeys.scopeDefinitionId - the id of the scoped object that needs to be checkeduserId - the id of the user for which the validation needs to be donegroupKeys - the group keys of the user for which the validation needs to be donetenantId - the tenant if of the user for which the validation needs to be done