use of org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogAuthorizationTest method testQueryWithHistoryReadPermissionOnAnyProcessDefinition.
public void testQueryWithHistoryReadPermissionOnAnyProcessDefinition() {
// given
startThreeProcessInstancesDeleteOneAndCompleteTwoWithFailure();
createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, READ_HISTORY);
// when
HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery();
// then
verifyQueryResults(query, 8);
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery in project camunda-bpm-platform by camunda.
the class HistoricExternalTaskLogAuthorizationTest method testQueryWithHistoryReadPermissionOnOneProcessDefinition.
public void testQueryWithHistoryReadPermissionOnOneProcessDefinition() {
// given
startThreeProcessInstancesDeleteOneAndCompleteTwoWithFailure();
createGrantAuthorization(PROCESS_DEFINITION, DEFAULT_PROCESS_KEY, userId, READ_HISTORY);
// when
HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery();
// then
verifyQueryResults(query, 6);
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricExternalTaskLogTest method testQueryNoAuthenticatedTenants.
@Test
public void testQueryNoAuthenticatedTenants() {
// given
identityService.setAuthentication("user", null, null);
// when
HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery();
// then
assertThat(query.count(), is(0L));
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricExternalTaskLogTest method testQueryAuthenticatedTenants.
@Test
public void testQueryAuthenticatedTenants() {
// given
identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE, TENANT_TWO));
// when
HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery();
// then
assertThat(query.count(), is(5L));
assertThat(query.tenantIdIn(TENANT_ONE).count(), is(2L));
assertThat(query.tenantIdIn(TENANT_TWO).count(), is(3L));
}
use of org.camunda.bpm.engine.history.HistoricExternalTaskLogQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricExternalTaskLogTest method testQueryDisabledTenantCheck.
@Test
public void testQueryDisabledTenantCheck() {
// given
engineRule.getProcessEngineConfiguration().setTenantCheckEnabled(false);
identityService.setAuthentication("user", null, null);
// when
HistoricExternalTaskLogQuery query = historyService.createHistoricExternalTaskLogQuery();
// then
assertThat(query.count(), is(5L));
}
Aggregations