Interface PermissionService
- All Known Subinterfaces:
CasePermissionService
,ProcessPermissionService
,TaskPermissionService
- All Known Implementing Classes:
CasePermissionServiceImpl
,ExternalWorkerJobPermissionService
,ProcessPermissionServiceImpl
,TaskPermissionServiceImpl
public interface PermissionService
- Author:
- Filip Hrisafov
-
Method Summary
Modifier and TypeMethodDescriptionfetchPermissionsForHistoricScope
(String scopeId, boolean checkWritePermissionInParent, String userId, Set<String> groupKeys, String tenantId) fetchPermissionsForHistoricScope
(String scopeId, String userId, Set<String> groupKeys, String tenantId) fetchPermissionsForRuntimeScope
(String scopeId, boolean checkWritePermissionInParent, String userId, Set<String> groupKeys, String tenantId) fetchPermissionsForRuntimeScope
(String scopeId, String userId, Set<String> groupKeys, String tenantId) 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 withscopeId
for theuserId
with the givengroupKeys
.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 withscopeDefinitionId
for theuserId
with the givengroupKeys
.
-
Method Details
-
getScopeType
String getScopeType()The scope type that this permissions service supports. -
validatePermissionForScope
default void validatePermissionForScope(String permission, String scopeId, String userId, Set<String> groupKeys, String tenantId) Validate the permission for the given scoped object withscopeId
for theuserId
with the givengroupKeys
. 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)
orvalidatePermissionForHistoricScope(String, String, String, Set, String)
should be preferred instead.- Parameters:
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 done
-
hasPermissionForScope
-
validatePermissionForRuntimeScope
-
validatePermissionsForRuntimeScope
-
hasPermissionForRuntimeScope
-
fetchPermissionsForRuntimeScope
-
fetchPermissionsForRuntimeScope
-
validatePermissionForHistoricScope
-
validatePermissionsForHistoricScope
-
hasPermissionForHistoricScope
-
fetchPermissionsForHistoricScope
-
fetchPermissionsForHistoricScope
-
validateReadPermissionOnScopeDefinition
default void validateReadPermissionOnScopeDefinition(String scopeDefinitionId, String scopeDefinitionKey, String userId, Set<String> groupKeys, String tenantId) Validation the permissions for the given scoped definition object withscopeDefinitionId
for theuserId
with the givengroupKeys
.- Parameters:
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
-
hasReadPermissionOnScopeDefinition
-