Tabnine Logo
AuthorizationManager.isAuthCheckExecuted
Code IndexAdd Tabnine to your IDE (free)

How to use
isAuthCheckExecuted
method
in
org.camunda.bpm.engine.impl.persistence.entity.AuthorizationManager

Best Java code snippets using org.camunda.bpm.engine.impl.persistence.entity.AuthorizationManager.isAuthCheckExecuted (Showing top 12 results out of 315)

origin: camunda/camunda-bpm-platform

public void checkAuthorization(CompositePermissionCheck compositePermissionCheck) {
 if(isAuthCheckExecuted()) {
  Authentication currentAuthentication = getCurrentAuthentication();
  String userId = currentAuthentication.getUserId();
  boolean isAuthorized = isAuthorized(compositePermissionCheck);
  if (!isAuthorized) {
   List<MissingAuthorization> missingAuthorizations = new ArrayList<MissingAuthorization>();
   for (PermissionCheck check: compositePermissionCheck.getAllPermissionChecks()) {
    missingAuthorizations.add(new MissingAuthorization(
      check.getPermission().getName(),
      check.getResource().resourceName(),
      check.getResourceId()));
   }
   throw new AuthorizationException(userId, missingAuthorizations);
  }
 }
}
origin: camunda/camunda-bpm-platform

public void checkAuthorization(List<PermissionCheck> permissionChecks) {
 if(isAuthCheckExecuted()) {
  Authentication currentAuthentication = getCurrentAuthentication();
  String userId = currentAuthentication.getUserId();
  boolean isAuthorized = isAuthorized(userId, currentAuthentication.getGroupIds(), permissionChecks);
  if (!isAuthorized) {
   List<MissingAuthorization> missingAuthorizations = new ArrayList<MissingAuthorization>();
   for (PermissionCheck check: permissionChecks) {
    missingAuthorizations.add(new MissingAuthorization(
      check.getPermission().getName(),
      check.getResource().resourceName(),
      check.getResourceId()));
   }
   throw new AuthorizationException(userId, missingAuthorizations);
  }
 }
}
origin: camunda/camunda-bpm-platform

public void checkAuthorization(List<PermissionCheck> permissionChecks) {
 if(isAuthCheckExecuted()) {
  Authentication currentAuthentication = getCurrentAuthentication();
  String userId = currentAuthentication.getUserId();
  boolean isAuthorized = isAuthorized(userId, currentAuthentication.getGroupIds(), permissionChecks);
  if (!isAuthorized) {
   List<MissingAuthorization> missingAuthorizations = new ArrayList<MissingAuthorization>();
   for (PermissionCheck check: permissionChecks) {
    missingAuthorizations.add(new MissingAuthorization(
      check.getPermission().getName(),
      check.getResource().resourceName(),
      check.getResourceId()));
   }
   throw new AuthorizationException(userId, missingAuthorizations);
  }
 }
}
origin: camunda/camunda-bpm-platform

public void checkAuthorization(CompositePermissionCheck compositePermissionCheck) {
 if(isAuthCheckExecuted()) {
  Authentication currentAuthentication = getCurrentAuthentication();
  String userId = currentAuthentication.getUserId();
  boolean isAuthorized = isAuthorized(compositePermissionCheck);
  if (!isAuthorized) {
   List<MissingAuthorization> missingAuthorizations = new ArrayList<MissingAuthorization>();
   for (PermissionCheck check: compositePermissionCheck.getAllPermissionChecks()) {
    missingAuthorizations.add(new MissingAuthorization(
      check.getPermission().getName(),
      check.getResource().resourceName(),
      check.getResourceId()));
   }
   throw new AuthorizationException(userId, missingAuthorizations);
  }
 }
}
origin: camunda/camunda-bpm-platform

@Override
public void checkAuthorization(Permission permission, Resource resource, String resourceId) {
 if(isAuthCheckExecuted()) {
  Authentication currentAuthentication = getCurrentAuthentication();
  boolean isAuthorized = isAuthorized(currentAuthentication.getUserId(), currentAuthentication.getGroupIds(), permission, resource, resourceId);
  if (!isAuthorized) {
   throw new AuthorizationException(
     currentAuthentication.getUserId(),
     permission.getName(),
     resource.resourceName(),
     resourceId);
  }
 }
}
origin: camunda/camunda-bpm-platform

@Override
public void checkAuthorization(Permission permission, Resource resource, String resourceId) {
 if(isAuthCheckExecuted()) {
  Authentication currentAuthentication = getCurrentAuthentication();
  boolean isAuthorized = isAuthorized(currentAuthentication.getUserId(), currentAuthentication.getGroupIds(), permission, resource, resourceId);
  if (!isAuthorized) {
   throw new AuthorizationException(
     currentAuthentication.getUserId(),
     permission.getName(),
     resource.resourceName(),
     resourceId);
  }
 }
}
origin: camunda/camunda-bpm-platform

public void configureQuery(ListQueryParameterObject query) {
 AuthorizationCheck authCheck = query.getAuthCheck();
 authCheck.getPermissionChecks().clear();
 if(isAuthCheckExecuted()) {
  Authentication currentAuthentication = getCurrentAuthentication();
  authCheck.setAuthUserId(currentAuthentication.getUserId());
  authCheck.setAuthGroupIds(currentAuthentication.getGroupIds());
  enableQueryAuthCheck(authCheck);
 }
 else {
  authCheck.setAuthorizationCheckEnabled(false);
  authCheck.setAuthUserId(null);
  authCheck.setAuthGroupIds(null);
 }
}
origin: camunda/camunda-bpm-platform

public void configureQuery(ListQueryParameterObject query) {
 AuthorizationCheck authCheck = query.getAuthCheck();
 authCheck.getPermissionChecks().clear();
 if(isAuthCheckExecuted()) {
  Authentication currentAuthentication = getCurrentAuthentication();
  authCheck.setAuthUserId(currentAuthentication.getUserId());
  authCheck.setAuthGroupIds(currentAuthentication.getGroupIds());
  enableQueryAuthCheck(authCheck);
 }
 else {
  authCheck.setAuthorizationCheckEnabled(false);
  authCheck.setAuthUserId(null);
  authCheck.setAuthGroupIds(null);
 }
}
origin: org.camunda.bpm/camunda-engine

public void checkAuthorization(CompositePermissionCheck compositePermissionCheck) {
 if(isAuthCheckExecuted()) {
  Authentication currentAuthentication = getCurrentAuthentication();
  String userId = currentAuthentication.getUserId();
  boolean isAuthorized = isAuthorized(compositePermissionCheck);
  if (!isAuthorized) {
   List<MissingAuthorization> missingAuthorizations = new ArrayList<MissingAuthorization>();
   for (PermissionCheck check: compositePermissionCheck.getAllPermissionChecks()) {
    missingAuthorizations.add(new MissingAuthorization(
      check.getPermission().getName(),
      check.getResource().resourceName(),
      check.getResourceId()));
   }
   throw new AuthorizationException(userId, missingAuthorizations);
  }
 }
}
origin: org.camunda.bpm/camunda-engine

public void checkAuthorization(List<PermissionCheck> permissionChecks) {
 if(isAuthCheckExecuted()) {
  Authentication currentAuthentication = getCurrentAuthentication();
  String userId = currentAuthentication.getUserId();
  boolean isAuthorized = isAuthorized(userId, currentAuthentication.getGroupIds(), permissionChecks);
  if (!isAuthorized) {
   List<MissingAuthorization> missingAuthorizations = new ArrayList<MissingAuthorization>();
   for (PermissionCheck check: permissionChecks) {
    missingAuthorizations.add(new MissingAuthorization(
      check.getPermission().getName(),
      check.getResource().resourceName(),
      check.getResourceId()));
   }
   throw new AuthorizationException(userId, missingAuthorizations);
  }
 }
}
origin: org.camunda.bpm/camunda-engine

@Override
public void checkAuthorization(Permission permission, Resource resource, String resourceId) {
 if(isAuthCheckExecuted()) {
  Authentication currentAuthentication = getCurrentAuthentication();
  boolean isAuthorized = isAuthorized(currentAuthentication.getUserId(), currentAuthentication.getGroupIds(), permission, resource, resourceId);
  if (!isAuthorized) {
   throw new AuthorizationException(
     currentAuthentication.getUserId(),
     permission.getName(),
     resource.resourceName(),
     resourceId);
  }
 }
}
origin: org.camunda.bpm/camunda-engine

public void configureQuery(ListQueryParameterObject query) {
 AuthorizationCheck authCheck = query.getAuthCheck();
 authCheck.getPermissionChecks().clear();
 if(isAuthCheckExecuted()) {
  Authentication currentAuthentication = getCurrentAuthentication();
  authCheck.setAuthUserId(currentAuthentication.getUserId());
  authCheck.setAuthGroupIds(currentAuthentication.getGroupIds());
  enableQueryAuthCheck(authCheck);
 }
 else {
  authCheck.setAuthorizationCheckEnabled(false);
  authCheck.setAuthUserId(null);
  authCheck.setAuthGroupIds(null);
 }
}
org.camunda.bpm.engine.impl.persistence.entityAuthorizationManagerisAuthCheckExecuted

Popular methods of AuthorizationManager

  • configureQuery
  • filterAuthenticatedGroupIds
  • isAuthorized
  • addPermissionCheck
  • checkAuthorization
  • checkCamundaAdmin
    Checks if the current authentication contains the group Groups#CAMUNDA_ADMIN. The check is ignored i
  • configureActivityStatisticsQuery
  • configureBatchQuery
  • configureBatchStatisticsQuery
  • configureConditionalEventSubscriptionQuery
  • configureDecisionDefinitionQuery
  • configureDecisionRequirementsDefinitionQuery
  • configureDecisionDefinitionQuery,
  • configureDecisionRequirementsDefinitionQuery,
  • configureDeploymentQuery,
  • configureDeploymentStatisticsQuery,
  • configureEventSubscriptionQuery,
  • configureExecutionQuery,
  • configureExternalTaskFetch,
  • configureExternalTaskQuery,
  • configureHistoricActivityInstanceQuery,
  • configureHistoricBatchQuery

Popular in Java

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • getSystemService (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now