Search in sources :

Example 1 with ResourceAuthorizationProvider

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);
    }
}
Also used : ResourceAuthorizationProvider(org.camunda.bpm.engine.impl.cfg.auth.ResourceAuthorizationProvider)

Example 2 with ResourceAuthorizationProvider

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);
    }
}
Also used : ResourceAuthorizationProvider(org.camunda.bpm.engine.impl.cfg.auth.ResourceAuthorizationProvider)

Example 3 with ResourceAuthorizationProvider

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);
    }
}
Also used : ResourceAuthorizationProvider(org.camunda.bpm.engine.impl.cfg.auth.ResourceAuthorizationProvider)

Example 4 with ResourceAuthorizationProvider

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);
    }
}
Also used : ResourceAuthorizationProvider(org.camunda.bpm.engine.impl.cfg.auth.ResourceAuthorizationProvider)

Example 5 with ResourceAuthorizationProvider

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);
    }
}
Also used : ResourceAuthorizationProvider(org.camunda.bpm.engine.impl.cfg.auth.ResourceAuthorizationProvider)

Aggregations

ResourceAuthorizationProvider (org.camunda.bpm.engine.impl.cfg.auth.ResourceAuthorizationProvider)9 AuthorizationEntity (org.camunda.bpm.engine.impl.persistence.entity.AuthorizationEntity)2