public List<Authorization> executeList(CommandContext commandContext, Page page) { checkQueryOk(); return commandContext.getAuthorizationManager() .selectAuthorizationByQueryCriteria(this); }
public long executeCount(CommandContext commandContext) { checkQueryOk(); return commandContext.getAuthorizationManager() .selectAuthorizationCountByQueryCriteria(this); }
@Override protected void checkAuthorization(Permission permission, Resource resource, String resourceId) { Context.getCommandContext() .getAuthorizationManager() .checkAuthorization(permission, resource, resourceId); }
@Override protected void configureQuery(@SuppressWarnings("rawtypes") AbstractQuery query, Resource resource) { Context.getCommandContext() .getAuthorizationManager() .configureQuery(query, resource); }
public long executeCount(CommandContext commandContext) { checkQueryOk(); return commandContext.getAuthorizationManager() .selectAuthorizationCountByQueryCriteria(this); }
public Set<String> execute(CommandContext commandContext) { commandContext.getAuthorizationManager().checkCamundaAdmin(); Set<String> registeredDeployments = Context.getProcessEngineConfiguration().getRegisteredDeployments(); return new HashSet<String>(registeredDeployments); } });
@Override public Object execute(CommandContext commandContext) { commandContext.getAuthorizationManager().checkCamundaAdmin(); commandContext.getWritableIdentityProvider().unlockUser(userId); return null; }
protected boolean isAuthorized(Permission permission, Resource resource, String resourceId) { return !ldapConfiguration.isAuthorizationCheckEnabled() || org.camunda.bpm.engine.impl.context.Context.getCommandContext() .getAuthorizationManager() .isAuthorized(permission, resource, resourceId); }
public String execute(CommandContext commandContext) { commandContext.getAuthorizationManager().checkCamundaAdmin(); DbSqlSessionFactory dbSqlSessionFactory = (DbSqlSessionFactory) commandContext.getSessionFactories().get(DbSqlSession.class); DbSqlSession dbSqlSession = new DbSqlSession(dbSqlSessionFactory, connection, catalog, schema); commandContext.getSessions().put(DbSqlSession.class, dbSqlSession); dbSqlSession.dbSchemaUpdate(); return ""; } });
public Map<String,Long> execute(CommandContext commandContext) { commandContext.getAuthorizationManager().checkCamundaAdmin(); return commandContext .getTableDataManager() .getTableCount(); } }
public Map<String,Long> execute(CommandContext commandContext) { commandContext.getAuthorizationManager().checkCamundaAdmin(); return commandContext .getTableDataManager() .getTableCount(); } }
public String execute(CommandContext commandContext) { commandContext.getAuthorizationManager().checkCamundaAdmin(); DbSqlSessionFactory dbSqlSessionFactory = (DbSqlSessionFactory) commandContext.getSessionFactories().get(DbSqlSession.class); DbSqlSession dbSqlSession = new DbSqlSession(dbSqlSessionFactory, connection, catalog, schema); commandContext.getSessions().put(DbSqlSession.class, dbSqlSession); dbSqlSession.dbSchemaUpdate(); return ""; } });
public Object execute(CommandContext commandContext) { AuthorizationManager authorizationManager = commandContext.getAuthorizationManager(); authorizationManager.checkCamundaAdmin(); final PropertyManager propertyManager = commandContext.getPropertyManager(); PropertyEntity propertyEntity = propertyManager.findPropertyById(name); if(propertyEntity != null) { propertyManager.delete(propertyEntity); } return null; }
public TableMetaData execute(CommandContext commandContext) { ensureNotNull("tableName", tableName); commandContext.getAuthorizationManager().checkCamundaAdmin(); return commandContext .getTableDataManager() .getTableMetaData(tableName); }
public String execute(CommandContext commandContext) { ensureNotNull("entityClass", entityClass); commandContext.getAuthorizationManager().checkCamundaAdmin(); return commandContext .getTableDataManager() .getTableName(entityClass, true); }
public Void execute(CommandContext commandContext) { if(deploymentIds == null) { throw new ProcessEngineException("Deployment Ids cannot be null."); } commandContext.getAuthorizationManager().checkCamundaAdmin(); Context.getProcessEngineConfiguration() .getProcessApplicationManager() .unregisterProcessApplicationForDeployments(deploymentIds, removeProcessesFromCache); return null; }
public String execute(CommandContext commandContext) { commandContext.getAuthorizationManager().checkCamundaAdmin(); ProcessApplicationReference reference = Context.getProcessEngineConfiguration() .getProcessApplicationManager() .getProcessApplicationForDeployment(deploymentId); if(reference != null) { return reference.getName(); } else { return null; } }
public Void execute(CommandContext commandContext) { final AuthorizationManager authorizationManager = commandContext.getAuthorizationManager(); AuthorizationEntity authorization = (AuthorizationEntity) new AuthorizationQueryImpl() .authorizationId(authorizationId) .singleResult(); ensureNotNull("Authorization for Id '" + authorizationId + "' does not exist", "authorization", authorization); authorizationManager.delete(authorization); return null; }
protected void checkAuthorizations(CommandContext commandContext, ProcessDefinitionEntity sourceDefinition, ProcessDefinitionEntity targetDefinition, Collection<String> processInstanceIds) { CompositePermissionCheck migrateInstanceCheck = new PermissionCheckBuilder() .conjunctive() .atomicCheckForResourceId(Resources.PROCESS_DEFINITION, sourceDefinition.getKey(), Permissions.MIGRATE_INSTANCE) .atomicCheckForResourceId(Resources.PROCESS_DEFINITION, targetDefinition.getKey(), Permissions.MIGRATE_INSTANCE) .build(); commandContext.getAuthorizationManager().checkAuthorization(migrateInstanceCheck); }
protected void checkAuthorizations(CommandContext commandContext, ProcessDefinitionEntity sourceDefinition, ProcessDefinitionEntity targetDefinition, Collection<String> processInstanceIds) { CompositePermissionCheck migrateInstanceCheck = new PermissionCheckBuilder() .conjunctive() .atomicCheckForResourceId(Resources.PROCESS_DEFINITION, sourceDefinition.getKey(), Permissions.MIGRATE_INSTANCE) .atomicCheckForResourceId(Resources.PROCESS_DEFINITION, targetDefinition.getKey(), Permissions.MIGRATE_INSTANCE) .build(); commandContext.getAuthorizationManager().checkAuthorization(migrateInstanceCheck); }