protected internal virtual void checkReadDecisionRequirementsDefinition(HistoricDecisionInstanceStatisticsQueryImpl query) { CommandContext commandContext = CommandContext; if (AuthorizationEnabled && CurrentAuthentication != null && commandContext.AuthorizationCheckEnabled) { string decisionRequirementsDefinitionId = query.DecisionRequirementsDefinitionId; DecisionRequirementsDefinition definition = DecisionRequirementsDefinitionManager.findDecisionRequirementsDefinitionById(decisionRequirementsDefinitionId); ensureNotNull("no deployed decision requirements definition found with id '" + decisionRequirementsDefinitionId + "'", "decisionRequirementsDefinition", definition); AuthorizationManager.checkAuthorization(READ, DECISION_REQUIREMENTS_DEFINITION, definition.Key); } }
protected internal virtual void checkReadProcessDefinition(ActivityStatisticsQueryImpl query) { CommandContext commandContext = CommandContext; if (AuthorizationEnabled && CurrentAuthentication != null && commandContext.AuthorizationCheckEnabled) { string processDefinitionId = query.ProcessDefinitionId; ProcessDefinitionEntity definition = ProcessDefinitionManager.findLatestProcessDefinitionById(processDefinitionId); ensureNotNull("no deployed process definition found with id '" + processDefinitionId + "'", "processDefinition", definition); AuthorizationManager.checkAuthorization(READ, PROCESS_DEFINITION, definition.Key); } }