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.booleanhasPermissionForHistoricScope(String permission, String scopeId, String userId, Set<String> groupKeys, String tenantId) booleanhasPermissionForRuntimeScope(String permission, String scopeId, String userId, Set<String> groupKeys, String tenantId) booleanhasPermissionForScope(String permission, String scopeId, String userId, Set<String> groupKeys, String tenantId) booleanhasReadPermissionOnScopeDefinition(String scopeDefinitionId, String scopeDefinitionKey, String userId, Set<String> groupKeys, String tenantId) default voidvalidatePermissionForHistoricScope(String permission, String scopeId, String userId, Set<String> groupKeys, String tenantId) default voidvalidatePermissionForRuntimeScope(String permission, String scopeId, String userId, Set<String> groupKeys, String tenantId) default voidvalidatePermissionForScope(String permission, String scopeId, String userId, Set<String> groupKeys, String tenantId) Validate the permission for the given scoped object withscopeIdfor theuserIdwith the givengroupKeys.default voidvalidatePermissionsForHistoricScope(Set<String> permissions, String scopeId, String userId, Set<String> groupKeys, String tenantId) default voidvalidatePermissionsForRuntimeScope(Set<String> permissions, String scopeId, String userId, Set<String> groupKeys, String tenantId) default voidvalidateReadPermissionOnScopeDefinition(String scopeDefinitionId, String scopeDefinitionKey, String userId, Set<String> groupKeys, String tenantId) Validation the permissions for the given scoped definition object withscopeDefinitionIdfor theuserIdwith 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 withscopeIdfor theuserIdwith 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 withscopeDefinitionIdfor theuserIdwith 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
-