Class PermissionService
- java.lang.Object
-
- org.flowable.ui.task.service.runtime.PermissionService
-
@Service @Transactional public class PermissionService extends Object
Centralized service for all permission-checks.- Author:
- Frederik Heremans
-
-
Field Summary
Fields Modifier and Type Field Description protected org.flowable.cmmn.api.CmmnHistoryServicecmmnHistoryServiceprotected HistoryServicehistoryServiceprotected RepositoryServicerepositoryServiceprotected RuntimeServiceruntimeServiceprotected TaskServicetaskService
-
Constructor Summary
Constructors Constructor Description PermissionService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanAddRelatedContentToCase(SecurityScope user, String caseId)booleancanAddRelatedContentToProcessInstance(SecurityScope user, String processInstanceId)booleancanAddRelatedContentToTask(SecurityScope user, String taskId)booleancanDeleteProcessInstance(SecurityScope currentUser, HistoricProcessInstance processInstance)booleancanDownloadContent(SecurityScope currentUserObject, ContentItem content)booleancanStartProcess(SecurityScope user, ProcessDefinition definition)protected List<String>getPotentialStarterGroupIds(List<org.flowable.identitylink.api.IdentityLink> identityLinks)protected List<String>getPotentialStarterUserIds(List<org.flowable.identitylink.api.IdentityLink> identityLinks)booleanhasReadPermissionOnCase(SecurityScope user, String caseId)Check if the given user is allowed to read the Case.booleanhasReadPermissionOnCaseInstance(SecurityScope user, org.flowable.cmmn.api.history.HistoricCaseInstance historicCaseInstance, String caseInstanceId)Check if the given user is allowed to read the process instance.booleanhasReadPermissionOnProcessInstance(SecurityScope user, String processInstanceId)Check if the given user is allowed to read the process instance.booleanhasReadPermissionOnProcessInstance(SecurityScope user, HistoricProcessInstance historicProcessInstance, String processInstanceId)Check if the given user is allowed to read the process instance.booleanhasWritePermissionOnRelatedContent(SecurityScope user, ContentItem content)booleanisInvolved(SecurityScope user, String taskId)booleanisTaskOwnerOrAssignee(SecurityScope user, String taskId)booleanisTaskOwnerOrAssignee(SecurityScope user, org.flowable.task.api.Task task)booleanvalidateIfUserIsInitiatorAndCanCompleteTask(SecurityScope user, org.flowable.task.api.Task task)org.flowable.task.api.history.HistoricTaskInstancevalidateReadPermissionOnTask(SecurityScope user, String taskId)Check if the given user is allowed to read the task.
-
-
-
Field Detail
-
taskService
@Autowired protected TaskService taskService
-
runtimeService
@Autowired protected RuntimeService runtimeService
-
repositoryService
@Autowired protected RepositoryService repositoryService
-
historyService
@Autowired protected HistoryService historyService
-
cmmnHistoryService
@Autowired protected org.flowable.cmmn.api.CmmnHistoryService cmmnHistoryService
-
-
Method Detail
-
validateReadPermissionOnTask
public org.flowable.task.api.history.HistoricTaskInstance validateReadPermissionOnTask(SecurityScope user, String taskId)
Check if the given user is allowed to read the task.
-
isTaskOwnerOrAssignee
public boolean isTaskOwnerOrAssignee(SecurityScope user, String taskId)
-
isTaskOwnerOrAssignee
public boolean isTaskOwnerOrAssignee(SecurityScope user, org.flowable.task.api.Task task)
-
validateIfUserIsInitiatorAndCanCompleteTask
public boolean validateIfUserIsInitiatorAndCanCompleteTask(SecurityScope user, org.flowable.task.api.Task task)
-
isInvolved
public boolean isInvolved(SecurityScope user, String taskId)
-
hasReadPermissionOnProcessInstance
public boolean hasReadPermissionOnProcessInstance(SecurityScope user, String processInstanceId)
Check if the given user is allowed to read the process instance.
-
hasReadPermissionOnCase
public boolean hasReadPermissionOnCase(SecurityScope user, String caseId)
Check if the given user is allowed to read the Case.
-
hasReadPermissionOnProcessInstance
public boolean hasReadPermissionOnProcessInstance(SecurityScope user, HistoricProcessInstance historicProcessInstance, String processInstanceId)
Check if the given user is allowed to read the process instance.
-
hasReadPermissionOnCaseInstance
public boolean hasReadPermissionOnCaseInstance(SecurityScope user, org.flowable.cmmn.api.history.HistoricCaseInstance historicCaseInstance, String caseInstanceId)
Check if the given user is allowed to read the process instance.
-
canAddRelatedContentToTask
public boolean canAddRelatedContentToTask(SecurityScope user, String taskId)
-
canAddRelatedContentToProcessInstance
public boolean canAddRelatedContentToProcessInstance(SecurityScope user, String processInstanceId)
-
canAddRelatedContentToCase
public boolean canAddRelatedContentToCase(SecurityScope user, String caseId)
-
canDownloadContent
public boolean canDownloadContent(SecurityScope currentUserObject, ContentItem content)
-
hasWritePermissionOnRelatedContent
public boolean hasWritePermissionOnRelatedContent(SecurityScope user, ContentItem content)
-
canDeleteProcessInstance
public boolean canDeleteProcessInstance(SecurityScope currentUser, HistoricProcessInstance processInstance)
-
canStartProcess
public boolean canStartProcess(SecurityScope user, ProcessDefinition definition)
-
getPotentialStarterGroupIds
protected List<String> getPotentialStarterGroupIds(List<org.flowable.identitylink.api.IdentityLink> identityLinks)
-
-