use of org.camunda.bpm.engine.history.HistoricIncidentQuery in project camunda-bpm-platform by camunda.
the class HistoricIncidentAuthorizationTest method testStartTimerJobIncidentQueryWithReadHistoryPermissionOnAnyProcessDefinition.
public void testStartTimerJobIncidentQueryWithReadHistoryPermissionOnAnyProcessDefinition() {
// given
disableAuthorization();
String jobId = managementService.createJobQuery().singleResult().getId();
managementService.setJobRetries(jobId, 0);
enableAuthorization();
createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, READ_HISTORY);
// when
HistoricIncidentQuery query = historyService.createHistoricIncidentQuery();
// then
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.history.HistoricIncidentQuery in project camunda-bpm-platform by camunda.
the class HistoricIncidentAuthorizationTest method testQueryWithReadHistoryPermissionOnProcessDefinition.
public void testQueryWithReadHistoryPermissionOnProcessDefinition() {
// given
startProcessAndExecuteJob(ONE_INCIDENT_PROCESS_KEY);
startProcessAndExecuteJob(ONE_INCIDENT_PROCESS_KEY);
startProcessAndExecuteJob(ANOTHER_ONE_INCIDENT_PROCESS_KEY);
startProcessAndExecuteJob(ANOTHER_ONE_INCIDENT_PROCESS_KEY);
startProcessAndExecuteJob(ANOTHER_ONE_INCIDENT_PROCESS_KEY);
createGrantAuthorization(PROCESS_DEFINITION, ONE_INCIDENT_PROCESS_KEY, userId, READ_HISTORY);
// when
HistoricIncidentQuery query = historyService.createHistoricIncidentQuery();
// then
verifyQueryResults(query, 2);
}
use of org.camunda.bpm.engine.history.HistoricIncidentQuery in project camunda-bpm-platform by camunda.
the class HistoricIncidentAuthorizationTest method testStartTimerJobIncidentQueryWithReadHistoryPermissionOnProcessDefinition.
public void testStartTimerJobIncidentQueryWithReadHistoryPermissionOnProcessDefinition() {
// given
disableAuthorization();
String jobId = managementService.createJobQuery().singleResult().getId();
managementService.setJobRetries(jobId, 0);
enableAuthorization();
createGrantAuthorization(PROCESS_DEFINITION, TIMER_START_PROCESS_KEY, userId, READ_HISTORY);
// when
HistoricIncidentQuery query = historyService.createHistoricIncidentQuery();
// then
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.history.HistoricIncidentQuery in project camunda-bpm-platform by camunda.
the class HistoricIncidentAuthorizationTest method testSimpleQueryWithReadHistoryPermissionOnAnyProcessDefinition.
public void testSimpleQueryWithReadHistoryPermissionOnAnyProcessDefinition() {
// given
startProcessAndExecuteJob(ONE_INCIDENT_PROCESS_KEY);
createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, READ_HISTORY);
// when
HistoricIncidentQuery query = historyService.createHistoricIncidentQuery();
// then
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.history.HistoricIncidentQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricIncidentQueryTest method testQueryNoAuthenticatedTenants.
public void testQueryNoAuthenticatedTenants() {
identityService.setAuthentication("user", null, null);
HistoricIncidentQuery query = historyService.createHistoricIncidentQuery();
assertThat(query.count(), is(0L));
}
Aggregations