Search in sources :

Example 6 with PermissionCheckBuilder

use of org.camunda.bpm.engine.impl.db.PermissionCheckBuilder in project camunda-bpm-platform by camunda.

the class AuthorizationManager method configureVariableInstanceQuery.

// variable instance query /////////////////////////////
protected void configureVariableInstanceQuery(VariableInstanceQueryImpl query) {
    configureQuery(query);
    if (query.getAuthCheck().isAuthorizationCheckEnabled()) {
        CompositePermissionCheck permissionCheck = new PermissionCheckBuilder().disjunctive().atomicCheck(PROCESS_INSTANCE, "RES.PROC_INST_ID_", READ).atomicCheck(PROCESS_DEFINITION, "PROCDEF.KEY_", READ_INSTANCE).atomicCheck(TASK, "RES.TASK_ID_", READ).build();
        addPermissionCheck(query.getAuthCheck(), permissionCheck);
    }
}
Also used : CompositePermissionCheck(org.camunda.bpm.engine.impl.db.CompositePermissionCheck) PermissionCheckBuilder(org.camunda.bpm.engine.impl.db.PermissionCheckBuilder)

Aggregations

CompositePermissionCheck (org.camunda.bpm.engine.impl.db.CompositePermissionCheck)6 PermissionCheckBuilder (org.camunda.bpm.engine.impl.db.PermissionCheckBuilder)6