use of org.camunda.bpm.engine.impl.cfg.auth.ResourceAuthorizationProvider in project camunda-bpm-platform by camunda.
the class ExecutionManager method createDefaultAuthorizations.
// helper ///////////////////////////////////////////////////////////
protected void createDefaultAuthorizations(ExecutionEntity execution) {
if (execution.isProcessInstanceExecution() && isAuthorizationEnabled()) {
ResourceAuthorizationProvider provider = getResourceAuthorizationProvider();
AuthorizationEntity[] authorizations = provider.newProcessInstance(execution);
saveDefaultAuthorizations(authorizations);
}
}
use of org.camunda.bpm.engine.impl.cfg.auth.ResourceAuthorizationProvider in project camunda-bpm-platform by camunda.
the class TaskEntity method fireDeleteIdentityLinkAuthorizationProvider.
protected void fireDeleteIdentityLinkAuthorizationProvider(String type, String userId, String groupId) {
if (isAuthorizationEnabled() && caseExecutionId == null) {
ResourceAuthorizationProvider provider = getResourceAuthorizationProvider();
AuthorizationEntity[] authorizations = null;
if (userId != null) {
authorizations = provider.deleteTaskUserIdentityLink(this, userId, type);
} else if (groupId != null) {
authorizations = provider.deleteTaskGroupIdentityLink(this, groupId, type);
}
deleteAuthorizations(authorizations);
}
}
use of org.camunda.bpm.engine.impl.cfg.auth.ResourceAuthorizationProvider in project camunda-bpm-platform by camunda.
the class TaskEntity method fireAddIdentityLinkAuthorizationProvider.
protected void fireAddIdentityLinkAuthorizationProvider(String type, String userId, String groupId) {
if (isAuthorizationEnabled() && caseExecutionId == null) {
ResourceAuthorizationProvider provider = getResourceAuthorizationProvider();
AuthorizationEntity[] authorizations = null;
if (userId != null) {
authorizations = provider.newTaskUserIdentityLink(this, userId, type);
} else if (groupId != null) {
authorizations = provider.newTaskGroupIdentityLink(this, groupId, type);
}
saveAuthorizations(authorizations);
}
}
use of org.camunda.bpm.engine.impl.cfg.auth.ResourceAuthorizationProvider in project camunda-bpm-platform by camunda.
the class ProcessDefinitionManager method createDefaultAuthorizations.
// helper ///////////////////////////////////////////////////////////
protected void createDefaultAuthorizations(ProcessDefinition processDefinition) {
if (isAuthorizationEnabled()) {
ResourceAuthorizationProvider provider = getResourceAuthorizationProvider();
AuthorizationEntity[] authorizations = provider.newProcessDefinition(processDefinition);
saveDefaultAuthorizations(authorizations);
}
}
use of org.camunda.bpm.engine.impl.cfg.auth.ResourceAuthorizationProvider in project camunda-bpm-platform by camunda.
the class TaskEntity method fireAuthorizationProvider.
protected void fireAuthorizationProvider(String property, String oldValue, String newValue) {
if (isAuthorizationEnabled() && caseExecutionId == null) {
ResourceAuthorizationProvider provider = getResourceAuthorizationProvider();
AuthorizationEntity[] authorizations = null;
if (ASSIGNEE.equals(property)) {
authorizations = provider.newTaskAssignee(this, oldValue, newValue);
} else if (OWNER.equals(property)) {
authorizations = provider.newTaskOwner(this, oldValue, newValue);
}
saveAuthorizations(authorizations);
}
}
Aggregations