public interface PolicyEnforcement
Check access entry point.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    checkAccess(String projectId, String action)
    This method is used if the params is String.class instead of UUID.class and Action.class
    default boolean
    checkAccess(String entityName, String projectId, String action)
    Performs evaluation of authorization policies using given entity name, current project and operation for currently authenticated user.
    boolean
    checkAccess(String entityName, Set<UUID> projectIdSet, String action)
    Performs evaluation of authorization policies using given entity name, set of projects and operation for currently authenticated user.
    boolean
    checkAccess(String entityName, Set<UUID> projectIdSet, Operation action)
    Performs evaluation of authorization policies using given entity name, set of projects and operation for currently authenticated user.
    default boolean
    checkAccess(String entityName, UUID projectId, String action)
    Performs evaluation of authorization policies using given entity name, current project and operation for currently authenticated user.
    default boolean
    checkAccess(String entityName, UUID projectId, Set<UUID> objectIds, String operation)
    Performs evaluation of authorization policies using given current project, set of objectIds and operation for currently authenticated user.
    boolean
    checkAccess(String entityName, UUID projectId, Set<UUID> objectIds, Operation operation)
    Performs evaluation of authorization policies using given current project, set of objectIds and operation for currently authenticated user.
    default boolean
    checkAccess(String entityName, UUID projectId, UUID objectId, String operation)
    Performs evaluation of authorization policies using given current project, objectId and operation for currently authenticated user.
    boolean
    checkAccess(String entityName, UUID projectId, UUID objectId, Operation operation)
    Performs evaluation of authorization policies using given current project, objectId and operation for currently authenticated user.
    boolean
    checkAccess(String entityName, UUID projectId, Operation action)
    Performs evaluation of authorization policies using given current project, entity name and operation for currently authenticated user.
    boolean
    checkAccess(Set<UUID> projectIdSet, String action)
    Performs evaluation of authorization policies using given set of projects and operation for currently authenticated user, execute checkAccess (UUID projectId, String action) for each project in the set.
    default boolean
    checkAccess(UUID projectId, String action)
    This method is used if the params is UUID.class and String.class instead of Action.class
    boolean
    checkAccess(UUID projectId, Operation action)
    Performs evaluation of authorization policies using given current project and operation for currently authenticated user.
    default boolean
    checkExternalAccess(String projectId, String action)
     
    boolean
    checkExternalAccess(String entityName, UUID projectId, Operation action)
    Performs evaluation of authorization policies using given current project, set of objectIds and operation for currently authenticated user.
    boolean
    checkPoliciesForOperation(String entityName, Project project, Operation operation)
     
    boolean
    Check policy for project.
    default Project
    getProjectEntityWithGroup(UUID projectId, List<UUID> leads, List<UUID> qaTaEngineers, List<UUID> devOpsEngineers, List<UUID> atpRunners, List<UUID> atpSupports, Permissions permissions)
    Create project entity with users fields.
    boolean
    Performs evaluation of authorization policies using user role.
    boolean
    Performs evaluation of authorization policies.
    boolean
     
    boolean
    Performs evaluation of authorization policies using user role.
  • Method Details

    • checkAccess

      default boolean checkAccess(String projectId, String action)
      This method is used if the params is String.class instead of UUID.class and Action.class
      Returns:
      permission
    • checkAccess

      default boolean checkAccess(UUID projectId, String action)
      This method is used if the params is UUID.class and String.class instead of Action.class
      Returns:
      permission
    • checkAccess

      boolean checkAccess(Set<UUID> projectIdSet, String action)
      Performs evaluation of authorization policies using given set of projects and operation for currently authenticated user, execute checkAccess (UUID projectId, String action) for each project in the set. If for at least one project checkAccess(UUID projectId, String action) return false, then the method will also return false.
      Returns:
      permission
    • checkAccess

      boolean checkAccess(UUID projectId, Operation action)
      Performs evaluation of authorization policies using given current project and operation for currently authenticated user.
      Returns:
      permission
    • checkAccess

      boolean checkAccess(String entityName, UUID projectId, Operation action)
      Performs evaluation of authorization policies using given current project, entity name and operation for currently authenticated user. This method is used if the params is UUID.class and String.class instead of Action.class.
      Returns:
      permission
    • checkAccess

      boolean checkAccess(String entityName, Set<UUID> projectIdSet, Operation action)
      Performs evaluation of authorization policies using given entity name, set of projects and operation for currently authenticated user.
      Returns:
      permission
    • checkAccess

      boolean checkAccess(String entityName, Set<UUID> projectIdSet, String action)
      Performs evaluation of authorization policies using given entity name, set of projects and operation for currently authenticated user.
      Returns:
      permission
    • checkAccess

      default boolean checkAccess(String entityName, UUID projectId, String action)
      Performs evaluation of authorization policies using given entity name, current project and operation for currently authenticated user.
      Returns:
      permission
    • checkAccess

      default boolean checkAccess(String entityName, String projectId, String action)
      Performs evaluation of authorization policies using given entity name, current project and operation for currently authenticated user.
      Returns:
      permission
    • checkAccess

      boolean checkAccess(String entityName, UUID projectId, UUID objectId, Operation operation)
      Performs evaluation of authorization policies using given current project, objectId and operation for currently authenticated user.
      Returns:
      permission
    • checkAccess

      default boolean checkAccess(String entityName, UUID projectId, UUID objectId, String operation)
      Performs evaluation of authorization policies using given current project, objectId and operation for currently authenticated user.
      Returns:
      permission
    • checkAccess

      boolean checkAccess(String entityName, UUID projectId, Set<UUID> objectIds, Operation operation)
      Performs evaluation of authorization policies using given current project, set of objectIds and operation for currently authenticated user.
      Returns:
      permission
    • checkAccess

      default boolean checkAccess(String entityName, UUID projectId, Set<UUID> objectIds, String operation)
      Performs evaluation of authorization policies using given current project, set of objectIds and operation for currently authenticated user.
      Returns:
      permission
    • checkExternalAccess

      boolean checkExternalAccess(String entityName, UUID projectId, Operation action)
      Performs evaluation of authorization policies using given current project, set of objectIds and operation for currently authenticated user.
      Returns:
      permission
    • checkExternalAccess

      default boolean checkExternalAccess(String projectId, String action)
    • isAdmin

      boolean isAdmin()
      Performs evaluation of authorization policies using user role.
    • isExternal

      boolean isExternal()
    • isSupport

      boolean isSupport()
      Performs evaluation of authorization policies using user role.
    • isAuthenticated

      boolean isAuthenticated()
      Performs evaluation of authorization policies.
    • getProjectEntityWithGroup

      default Project getProjectEntityWithGroup(UUID projectId, List<UUID> leads, List<UUID> qaTaEngineers, List<UUID> devOpsEngineers, List<UUID> atpRunners, List<UUID> atpSupports, Permissions permissions)
      Create project entity with users fields.
      Parameters:
      leads - list of leads ID
      qaTaEngineers - list of QA/TA engineers ID
      devOpsEngineers - list of devops engineers ID
      atpRunners - list of atp runners ID
      Returns:
      Project
    • checkPoliciesForOperation

      boolean checkPoliciesForOperation(Project project, Operation operation)
      Check policy for project.
      Parameters:
      project - Project
      operation - Operation
      Returns:
      result of checking policy
    • checkPoliciesForOperation

      boolean checkPoliciesForOperation(String entityName, Project project, Operation operation)