Class TaskPermissionServiceImpl
java.lang.Object
com.flowable.platform.security.service.AbstractPlatformSecurityService
com.flowable.platform.security.permission.TaskPermissionServiceImpl
- All Implemented Interfaces:
PermissionService
,PermissionServiceRegistryAware
,TaskPermissionService
,Aware
public class TaskPermissionServiceImpl
extends AbstractPlatformSecurityService
implements TaskPermissionService
-
Field Summary
Modifier and TypeFieldDescriptionprotected CmmnHistoryService
protected HistoryService
protected PlatformIdentityService
protected String
Fields inherited from class com.flowable.platform.security.service.AbstractPlatformSecurityService
additionalAdminUsers, CASE_PREFIX, cmmnRepositoryService, cmmnRuntimeService, cmmnTaskService, defaultSecurityPolicyKey, defaultSecurityPolicyModel, EXTERNAL_WORKER_PREFIX, inspectEnabled, permissionServiceRegistry, platformSecurityInterceptor, policyRepositoryService, PROCESS_PREFIX, repositoryService, runtimeService, SECURITY_POLICY_MODEL, TASK_PREFIX, taskService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkPermissionInCaseParent
(String casePermission, SecurityPolicyModel securityPolicyModel) protected boolean
checkPermissionInProcessParent
(String processPermission, SecurityPolicyModel securityPolicyModel) fetchPermissionsForHistoricScope
(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) protected HistoricTaskInstance
getHistoricTask
(String taskId, String tenantId) getHistoricTaskPermissions
(String taskId, String taskDefinitionKey, String instanceId, String definitionId, String scopeType, String assignee, String owner, List<? extends IdentityLinkInfo> identityLinks, String tenantId) protected ProcessInstance
getProcessInstance
(String processInstanceId, String tenantId) getRuntimeTaskPermissions
(String taskId, String taskDefinitionKey, String instanceId, String definitionId, String scopeType, String assignee, String owner, List<? extends IdentityLinkInfo> identityLinks, String tenantId) The scope type that this permissions service supports.getSecurityPolicyModelForCaseInstance
(String caseInstanceId) getSecurityPolicyModelForProcessInstance
(String processInstanceId) getTaskCandidateTypes
(Task task) protected boolean
hasPermission
(String permission, String assignee, String owner, List<? extends IdentityLinkInfo> identityLinks, SecurityPolicyModel securityPolicyModel) protected boolean
hasPermissionForAdhocTask
(String permission, String parentTaskId, boolean isHistoricInstance, String assignee, String owner, List<? extends IdentityLinkInfo> identityLinks, String userId, Set<String> groupKeys, String tenantId) boolean
hasPermissionForHistoricScope
(String permission, String scopeId, String userId, Set<String> groupKeys, String tenantId) protected boolean
hasPermissionForHistoricTask
(String permission, HistoricTaskInstance historicTaskInstance, String userId, Set<String> groupKeys, String tenantId) boolean
hasPermissionForRuntimeScope
(String permission, String scopeId, String userId, Set<String> groupKeys, String tenantId) protected boolean
hasPermissionForRuntimeTask
(String permission, Task task, String userId, Set<String> groupKeys, String tenantId) boolean
hasPermissionForScope
(String permission, String scopeId, String userId, Set<String> groupKeys, String tenantId) protected boolean
hasPermissionForTaskInCase
(String permission, String taskDefinitionKey, boolean isHistoricInstance, String assignee, String owner, List<? extends IdentityLinkInfo> identityLinks, String caseInstanceId, String caseDefinitionId, String userId, Set<String> groupKeys, String tenantId) protected boolean
hasPermissionForTaskInProcess
(String permission, String taskDefinitionKey, boolean isHistoricInstance, String assignee, String owner, List<? extends IdentityLinkInfo> identityLinks, String processInstanceId, String processDefinitionId, String userId, Set<String> groupKeys, String tenantId) protected boolean
hasPermissionOnParentTask
(String permission, String parentTaskId, boolean isHistoricInstance, String assignee, String owner, List<? extends IdentityLinkInfo> identityLinks, String userId, Set<String> groupKeys, String tenantId) boolean
hasReadPermissionOnScopeDefinition
(String scopeDefinitionId, String scopeDefinitionKey, String userId, Set<String> groupKeys, String tenantId) translateParentPermissions
(List<String> parentPermissions, String scopeType) void
validateAssigneeValue
(Task task, String newAssignee) void
validateParticipantValue
(Task task, String newParticipant) Methods inherited from class com.flowable.platform.security.service.AbstractPlatformSecurityService
currentUserHasAdminRights, currentUserIsSuperAdmin, fetchCasePermissionMappings, fetchCasePermissionMappings, fetchCaseSecurityPolicyModel, fetchPermissions, fetchPermissionsForTask, fetchProcessPermissionMappings, fetchProcessPermissionMappings, fetchProcessSecurityPolicyModel, fetchSecurityPolicyModel, fetchSecurityPolicyModel, fetchSecurityPolicyModelForCaseInstance, fetchSecurityPolicyModelForProcessInstance, fetchSecurityPolicyModelForTask, fetchSecurityPolicyModelForTask, fetchTaskPermissionMappings, fetchTaskPermissionMappings, fetchTaskPermissionMappings, fetchTaskPermissionMappingsForCase, fetchTaskPermissionMappingsForProcess, fetchTaskSecurityPolicyModelForCase, fetchTaskSecurityPolicyModelForProcess, filterPermissionsForRole, getCmmnExtensionElementValue, getCurrentGroupKeys, getCurrentSecurityScope, getCurrentTenantId, getCurrentUserId, getDefaultSecurityPolicyModel, getExtensionElementValue, getSecurityPolicyModelByKey, groupOrUserMatches, groupOrUserMatches, hasAnyMatchingIdentityLink, hasAssigneeOrOwnerIdentityLink, hasPermissionForEntityLinks, hasPermissionForHistoricEntityLinks, setPermissionServiceRegistry, translatePermissionForScope
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.flowable.platform.security.permission.PermissionService
validatePermissionForHistoricScope, validatePermissionForRuntimeScope, validatePermissionForScope, validatePermissionsForHistoricScope, validatePermissionsForRuntimeScope, validateReadPermissionOnScopeDefinition
-
Field Details
-
historyService
-
cmmnHistoryService
-
identityService
-
participantCandidateGroups
-
-
Constructor Details
-
TaskPermissionServiceImpl
-
-
Method Details
-
getScopeType
Description copied from interface:PermissionService
The scope type that this permissions service supports.- Specified by:
getScopeType
in interfacePermissionService
-
hasPermissionForScope
public boolean hasPermissionForScope(String permission, String scopeId, String userId, Set<String> groupKeys, String tenantId) - Specified by:
hasPermissionForScope
in interfacePermissionService
-
hasPermissionForRuntimeScope
public boolean hasPermissionForRuntimeScope(String permission, String scopeId, String userId, Set<String> groupKeys, String tenantId) - Specified by:
hasPermissionForRuntimeScope
in interfacePermissionService
-
fetchPermissionsForRuntimeScope
public List<String> fetchPermissionsForRuntimeScope(String scopeId, String userId, Set<String> groupKeys, String tenantId) - Specified by:
fetchPermissionsForRuntimeScope
in interfacePermissionService
-
fetchPermissionsForRuntimeScope
public List<String> fetchPermissionsForRuntimeScope(String scopeId, boolean checkWritePermissionInParent, String userId, Set<String> groupKeys, String tenantId) - Specified by:
fetchPermissionsForRuntimeScope
in interfacePermissionService
-
hasPermissionForHistoricScope
public boolean hasPermissionForHistoricScope(String permission, String scopeId, String userId, Set<String> groupKeys, String tenantId) - Specified by:
hasPermissionForHistoricScope
in interfacePermissionService
-
fetchPermissionsForHistoricScope
public List<String> fetchPermissionsForHistoricScope(String scopeId, String userId, Set<String> groupKeys, String tenantId) - Specified by:
fetchPermissionsForHistoricScope
in interfacePermissionService
-
fetchPermissionsForHistoricScope
public List<String> fetchPermissionsForHistoricScope(String scopeId, boolean checkWritePermissionInParent, String userId, Set<String> groupKeys, String tenantId) - Specified by:
fetchPermissionsForHistoricScope
in interfacePermissionService
-
getRuntimeTaskPermissions
public List<String> getRuntimeTaskPermissions(String taskId, String taskDefinitionKey, String instanceId, String definitionId, String scopeType, String assignee, String owner, List<? extends IdentityLinkInfo> identityLinks, String tenantId) - Specified by:
getRuntimeTaskPermissions
in interfaceTaskPermissionService
-
getHistoricTaskPermissions
public List<String> getHistoricTaskPermissions(String taskId, String taskDefinitionKey, String instanceId, String definitionId, String scopeType, String assignee, String owner, List<? extends IdentityLinkInfo> identityLinks, String tenantId) - Specified by:
getHistoricTaskPermissions
in interfaceTaskPermissionService
-
hasReadPermissionOnScopeDefinition
public boolean hasReadPermissionOnScopeDefinition(String scopeDefinitionId, String scopeDefinitionKey, String userId, Set<String> groupKeys, String tenantId) - Specified by:
hasReadPermissionOnScopeDefinition
in interfacePermissionService
-
getSecurityPolicyModelForProcessInstance
- Specified by:
getSecurityPolicyModelForProcessInstance
in interfaceTaskPermissionService
-
getSecurityPolicyModelForCaseInstance
- Specified by:
getSecurityPolicyModelForCaseInstance
in interfaceTaskPermissionService
-
hasPermissionForRuntimeTask
-
hasPermissionForHistoricTask
-
hasPermissionForTaskInProcess
protected boolean hasPermissionForTaskInProcess(String permission, String taskDefinitionKey, boolean isHistoricInstance, String assignee, String owner, List<? extends IdentityLinkInfo> identityLinks, String processInstanceId, String processDefinitionId, String userId, Set<String> groupKeys, String tenantId) -
hasPermissionForTaskInCase
-
hasPermissionForAdhocTask
-
hasPermissionOnParentTask
-
hasPermission
protected boolean hasPermission(String permission, String assignee, String owner, List<? extends IdentityLinkInfo> identityLinks, SecurityPolicyModel securityPolicyModel) -
getTask
- Specified by:
getTask
in interfaceTaskPermissionService
-
getHistoricTask
-
getProcessInstance
-
translateParentPermissions
-
checkPermissionInProcessParent
protected boolean checkPermissionInProcessParent(String processPermission, SecurityPolicyModel securityPolicyModel) -
checkPermissionInCaseParent
protected boolean checkPermissionInCaseParent(String casePermission, SecurityPolicyModel securityPolicyModel) -
validateAssigneeValue
- Specified by:
validateAssigneeValue
in interfaceTaskPermissionService
-
validateParticipantValue
- Specified by:
validateParticipantValue
in interfaceTaskPermissionService
-
getTaskCandidateTypes
- Specified by:
getTaskCandidateTypes
in interfaceTaskPermissionService
-