Search in sources :

Example 56 with DeploymentQuery

use of org.camunda.bpm.engine.repository.DeploymentQuery in project camunda-bpm-platform by camunda.

the class DeploymentAuthorizationTest method testDeploymentQueryWithoutAuthorization.

public void testDeploymentQueryWithoutAuthorization() {
    // given
    String deploymentId1 = createDeployment("first");
    String deploymentId2 = createDeployment("second");
    // when
    DeploymentQuery query = repositoryService.createDeploymentQuery();
    // then
    verifyQueryResults(query, 0);
    deleteDeployment(deploymentId1);
    deleteDeployment(deploymentId2);
}
Also used : DeploymentQuery(org.camunda.bpm.engine.repository.DeploymentQuery)

Example 57 with DeploymentQuery

use of org.camunda.bpm.engine.repository.DeploymentQuery in project camunda-bpm-platform by camunda.

the class DeploymentAuthorizationTest method testSimpleDeploymentQueryWithMultiple.

public void testSimpleDeploymentQueryWithMultiple() {
    // given
    String deploymentId = createDeployment(null);
    createGrantAuthorization(DEPLOYMENT, deploymentId, userId, READ);
    createGrantAuthorization(DEPLOYMENT, ANY, userId, READ);
    // when
    DeploymentQuery query = repositoryService.createDeploymentQuery();
    // then
    verifyQueryResults(query, 1);
    deleteDeployment(deploymentId);
}
Also used : DeploymentQuery(org.camunda.bpm.engine.repository.DeploymentQuery)

Example 58 with DeploymentQuery

use of org.camunda.bpm.engine.repository.DeploymentQuery in project camunda-bpm-platform by camunda.

the class DeploymentAuthorizationTest method testSimpleDeploymentQueryWithReadPermissionOnDeployment.

public void testSimpleDeploymentQueryWithReadPermissionOnDeployment() {
    // given
    String deploymentId = createDeployment(null);
    createGrantAuthorization(DEPLOYMENT, deploymentId, userId, READ);
    // when
    DeploymentQuery query = repositoryService.createDeploymentQuery();
    // then
    verifyQueryResults(query, 1);
    deleteDeployment(deploymentId);
}
Also used : DeploymentQuery(org.camunda.bpm.engine.repository.DeploymentQuery)

Aggregations

DeploymentQuery (org.camunda.bpm.engine.repository.DeploymentQuery)58 ProcessApplicationDeployment (org.camunda.bpm.engine.repository.ProcessApplicationDeployment)13 BpmnModelInstance (org.camunda.bpm.model.bpmn.BpmnModelInstance)13 Deployment (org.camunda.bpm.engine.repository.Deployment)11 ProcessDefinitionQuery (org.camunda.bpm.engine.repository.ProcessDefinitionQuery)8 Test (org.junit.Test)7 ProcessDefinition (org.camunda.bpm.engine.repository.ProcessDefinition)5 ProcessEngineException (org.camunda.bpm.engine.ProcessEngineException)4