protected internal virtual void checkAccess(CommandContext commandContext, BatchEntity batch) { foreach (CommandChecker checker in commandContext.ProcessEngineConfiguration.CommandCheckers) { checkAccess(checker, batch); } }
public virtual void checkActivateBatch(BatchEntity batch) { if (batch != null && !TenantManager.isAuthenticatedTenant(batch.TenantId)) { throw LOG.exceptionCommandWithUnauthorizedTenant("activate batch '" + batch.Id + "'"); } }
public virtual Void execute(CommandContext commandContext) { ensureNotNull(typeof(BadUserRequestException), "Batch id must not be null", "batch id", batchId); BatchManager batchManager = commandContext.BatchManager; BatchEntity batch = batchManager.findBatchById(batchId); ensureNotNull(typeof(BadUserRequestException), "Batch for id '" + batchId + "' cannot be found", "batch", batch); checkAccess(commandContext, batch); setJobDefinitionState(commandContext, batch.SeedJobDefinitionId); setJobDefinitionState(commandContext, batch.MonitorJobDefinitionId); setJobDefinitionState(commandContext, batch.BatchJobDefinitionId); batchManager.updateBatchSuspensionStateById(batchId, NewSuspensionState); logUserOperation(commandContext); return(null); }
public virtual void checkActivateBatch(BatchEntity batch) { AuthorizationManager.checkAuthorization(UPDATE, BATCH, batch.Id); }
public virtual void checkDeleteBatch(BatchEntity batch) { AuthorizationManager.checkAuthorization(DELETE, BATCH, batch.Id); }
protected internal abstract void checkAccess(CommandChecker checker, BatchEntity batch);
protected internal override void checkAccess(CommandChecker checker, BatchEntity batch) { checker.checkSuspendBatch(batch); }