Interface PolicyEnforcement
public interface PolicyEnforcement
Check access entry point.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleancheckAccess(String projectId, String action) This method is used if params are of String class instead of UUID and Action classes.default booleancheckAccess(String entityName, String projectId, String action) Performs evaluation of authorization policies using given entity name, current project and operation for currently authenticated user.booleancheckAccess(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.booleancheckAccess(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 booleancheckAccess(String entityName, UUID projectId, String action) Performs evaluation of authorization policies using given entity name, current project and operation for currently authenticated user.default booleanPerforms evaluation of authorization policies using given current project, set of objectIds and operation for currently authenticated user.booleanPerforms evaluation of authorization policies using given current project, set of objectIds and operation for currently authenticated user.default booleancheckAccess(String entityName, UUID projectId, UUID objectId, String operation) Performs evaluation of authorization policies using given current project, objectId and operation for currently authenticated user.booleancheckAccess(String entityName, UUID projectId, UUID objectId, Operation operation) Performs evaluation of authorization policies using given current project, objectId and operation for currently authenticated user.booleancheckAccess(String entityName, UUID projectId, Operation action) Performs evaluation of authorization policies using given current project, entity name and operation for currently authenticated user.booleancheckAccess(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 booleancheckAccess(UUID projectId, String action) This method is used if params are of UUID and String classes instead of Action class.booleancheckAccess(UUID projectId, Operation action) Performs evaluation of authorization policies using given current project and operation for currently authenticated user.default booleancheckExternalAccess(String projectId, String action) Check external access permissions.booleancheckExternalAccess(String entityName, UUID projectId, Operation action) Performs evaluation of authorization policies using given current project, set of objectIds and operation for currently authenticated user.booleancheckPoliciesForOperation(String entityName, Project project, Operation operation) Check permissions to perform the operation against the entityName under the project.booleancheckPoliciesForOperation(Project project, Operation operation) Check policy for project.default ProjectgetProjectEntityWithGroup(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.booleanisAdmin()Performs evaluation of authorization policies using user role.booleanPerforms evaluation of authorization policies.booleanCheck if it's external access.booleanPerforms evaluation of authorization policies using user role.
-
Method Details
-
checkAccess
This method is used if params are of String class instead of UUID and Action classes.- Parameters:
projectId- Project idaction- Operation name (e.g. CREATE, READ, ...)- Returns:
- permission (true - allowed, false - forbidden).
-
checkAccess
This method is used if params are of UUID and String classes instead of Action class.- Parameters:
projectId- Project idaction- Operation name (e.g. CREATE, READ, ...)- Returns:
- permission (true - allowed, false - forbidden).
-
checkAccess
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.- Parameters:
projectIdSet- Set of Project idsaction- Operation name (e.g. CREATE, READ, ...)- Returns:
- permission (true - allowed, false - forbidden).
-
checkAccess
Performs evaluation of authorization policies using given current project and operation for currently authenticated user.- Parameters:
projectId- Project idaction- Operation (e.g. CREATE, READ, ...)- Returns:
- permission (true - allowed, false - forbidden).
-
checkAccess
Performs evaluation of authorization policies using given current project, entity name and operation for currently authenticated user. This method is used if params are of UUID class and String class instead of Action class.- Parameters:
entityName- Name of entity classprojectId- Project idaction- Operation (e.g. CREATE, READ, ...)- Returns:
- permission (true - allowed, false - forbidden).
-
checkAccess
Performs evaluation of authorization policies using given entity name, set of projects and operation for currently authenticated user.- Parameters:
entityName- Name of entity classprojectIdSet- Set of Project idsaction- Operation (e.g. CREATE, READ, ...)- Returns:
- permission (true - allowed, false - forbidden).
-
checkAccess
Performs evaluation of authorization policies using given entity name, set of projects and operation for currently authenticated user.- Parameters:
entityName- Name of entity classprojectIdSet- Set of Project idsaction- Operation name (e.g. CREATE, READ, ...)- Returns:
- permission (true - allowed, false - forbidden).
-
checkAccess
Performs evaluation of authorization policies using given entity name, current project and operation for currently authenticated user.- Parameters:
entityName- Name of entity classprojectId- Project idaction- Operation name (e.g. CREATE, READ, ...)- Returns:
- permission (true - allowed, false - forbidden).
-
checkAccess
Performs evaluation of authorization policies using given entity name, current project and operation for currently authenticated user.- Parameters:
entityName- Name of entity classprojectId- Project idaction- Operation name (e.g. CREATE, READ, ...)- Returns:
- permission (true - allowed, false - forbidden).
-
checkAccess
Performs evaluation of authorization policies using given current project, objectId and operation for currently authenticated user.- Parameters:
entityName- Name of entity classprojectId- Project idobjectId- Object idoperation- Operation (e.g. CREATE, READ, ...)- Returns:
- permission (true - allowed, false - forbidden).
-
checkAccess
Performs evaluation of authorization policies using given current project, objectId and operation for currently authenticated user.- Parameters:
entityName- Name of entity classprojectId- Project idobjectId- Object idoperation- Operation name (e.g. CREATE, READ, ...)- Returns:
- permission (true - allowed, false - forbidden).
-
checkAccess
Performs evaluation of authorization policies using given current project, set of objectIds and operation for currently authenticated user.- Parameters:
entityName- Name of entity classprojectId- Project idobjectIds- Set of Object idsoperation- Operation (e.g. CREATE, READ, ...)- Returns:
- permission (true - allowed, false - forbidden).
-
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.- Parameters:
entityName- Name of entity classprojectId- Project idobjectIds- Set of Object idsoperation- Operation name (e.g. CREATE, READ, ...)- Returns:
- permission (true - allowed, false - forbidden).
-
checkExternalAccess
Performs evaluation of authorization policies using given current project, set of objectIds and operation for currently authenticated user.- Parameters:
entityName- Name of entity classprojectId- Project idaction- Operation (e.g. CREATE, READ, ...)- Returns:
- permission (true - allowed, false - forbidden).
-
checkExternalAccess
Check external access permissions.- Parameters:
projectId- Project idaction- Operation name (e.g. CREATE, READ, ...)- Returns:
- permission (true - allowed, false - forbidden).
-
isAdmin
boolean isAdmin()Performs evaluation of authorization policies using user role.- Returns:
- true if the user has admin rights, otherwise false.
-
isExternal
boolean isExternal()Check if it's external access.- Returns:
- true/false.
-
isSupport
boolean isSupport()Performs evaluation of authorization policies using user role.- Returns:
- true if the user has support rights, otherwise false.
-
isAuthenticated
boolean isAuthenticated()Performs evaluation of authorization policies.- Returns:
- true if the user is authenticated, otherwise false.
-
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:
projectId- Project idleads- list of leads IDsqaTaEngineers- list of QA/TA engineers IDsdevOpsEngineers- list of devops engineers IDsatpRunners- list of atp runners IDsatpSupports- list of atp supports IDspermissions- Permissions object- Returns:
Projectobject.
-
checkPoliciesForOperation
Check policy for project. -
checkPoliciesForOperation
Check permissions to perform the operation against the entityName under the project.- Parameters:
entityName- Name of entity classproject- Project objectoperation- Operation (e.g. CREATE, READ, ...)- Returns:
- permission (true - allowed, false - forbidden).
-