Class ServerAccessChecker
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.auth.ServerAccessChecker
-
- All Implemented Interfaces:
AccessChecker
public class ServerAccessChecker extends Object implements AccessChecker
-
-
Constructor Summary
Constructors Constructor Description ServerAccessChecker(ServerResponsibility serverResponsibility)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkAdminSpaceAvailable()
Checks authority can see admin area pages.void
checkCanAddToRemoveFromGroup(SUserGroup group)
void
checkCanAdministerAgent(SBuildAgent agent)
void
checkCanChangeUserOrGroupRole(RoleScope scope, Role role)
void
checkCanCopyProject(SProject originalProject, SProject parentOfCopy)
void
checkCanCreateBuildPromotion()
void
checkCanCreateRemoveVcsRoot(SProject project)
void
checkCanDeleteUser(SUser user)
void
checkCanDeleteUserGroup(SUserGroup group)
void
checkCanEditBuildType(SBuildType buildType)
void
checkCanEditFeatureOfType(SProject project, String featureType)
void
checkCanEditNotification(NotificationRulesHolder notificationRulesHolder, Collection<String> projectIds)
void
checkCanEditNotifications(NotificationRulesHolder notificationRulesHolder)
void
checkCanEditProject(SProject project)
void
checkCanEditTemplate(BuildTypeTemplate template)
void
checkCanEditUser(SUser user)
void
checkCanEditUserGroup(SUserGroup userGroup)
void
checkCanEditVcsModification(SVcsModification vcsModification)
void
checkCanEditVcsRoot(SVcsRoot vcsRoot)
void
checkCanEditVcsUsername(SUser user, String projectId)
void
checkCanManagePoolProjectAssociations(Set<String> projectIds)
Checks authority can manage agent pools the given projects are associated withvoid
checkCanManageRolesInScope(RoleScope scope)
void
checkCanRemoveBuild(SBuild build)
void
checkCanRemoveProject(SProject project)
void
checkCanRunBuildOnAgent(BuildType buildType, BuildAgent agent)
void
checkCanRunBuildWithCustomPatch(BuildType buildType)
void
checkCanStopBuild(SQueuedBuild queuedBuild)
void
checkCanStopBuild(SRunningBuild build)
void
checkCanViewAgent(SBuildAgent agent)
void
checkCanViewAgentDetailsInPool(AgentPool agentPool)
void
checkCanViewAgentPool(AgentPool agentPool)
void
checkCanViewAgentTypeDetails(SAgentType agentType)
void
checkCanViewBuild(Build build)
void
checkCanViewFileContent(String projectId)
void
checkCanViewFileContent(SVcsModification mod)
void
checkCanViewProject(String projectId)
void
checkCanViewSettings(SBuildType buildType)
void
checkCanViewSettings(SProject project)
void
checkCanViewUser(SUser user)
void
checkCanViewUserProfile(SUser user)
void
checkCanViewVcsModification(SVcsModification vcsModification)
void
checkCanViewVcsRoot(SVcsRoot vcsRoot)
void
checkHasAnyPermissionForProject(String projectId, Permission... permissions)
Checks authority has at least one of the specified permissions in the project.void
checkHasGlobalPermission(Permission... permissions)
Checks authority has all the specified permissions assigned globally.void
checkHasPermissionForAnyProject(Permission permission)
Checks authority has the specified permission in at least one project.void
checkHasPermissionForAnyProjectOrGlobal(Permission projectPermission, Permission globalPermission)
Checks authority has the project-associated permission in at least one project or the global permission.void
checkHasPermissionForPool(AgentPool pool, Permission globalPermission, Permission poolPermission)
Checks authority has either the project-level permission in all projects associated with the pool or the global permission.void
checkHasPermissionForProjectOrGlobal(String projectId, Permission projectPermission, Permission globalPermission)
Checks authority has either the project-associated permission in the project or the global permission.void
checkHasPermissionsForProject(String projectId, Permission... permissions)
Checks authority has all specified permissions in the project.void
setSecurityContext(SecurityContextEx securityContext)
-
-
-
Constructor Detail
-
ServerAccessChecker
public ServerAccessChecker(@NotNull ServerResponsibility serverResponsibility)
-
-
Method Detail
-
setSecurityContext
public void setSecurityContext(@NotNull SecurityContextEx securityContext)
-
checkHasGlobalPermission
public void checkHasGlobalPermission(@NotNull Permission... permissions)
Description copied from interface:AccessChecker
Checks authority has all the specified permissions assigned globally.- Specified by:
checkHasGlobalPermission
in interfaceAccessChecker
-
checkHasPermissionForAnyProject
public void checkHasPermissionForAnyProject(@NotNull Permission permission)
Description copied from interface:AccessChecker
Checks authority has the specified permission in at least one project.- Specified by:
checkHasPermissionForAnyProject
in interfaceAccessChecker
-
checkHasAnyPermissionForProject
public void checkHasAnyPermissionForProject(@NotNull String projectId, @NotNull Permission... permissions) throws AccessDeniedException
Description copied from interface:AccessChecker
Checks authority has at least one of the specified permissions in the project.- Specified by:
checkHasAnyPermissionForProject
in interfaceAccessChecker
- Throws:
AccessDeniedException
-
checkHasPermissionsForProject
public void checkHasPermissionsForProject(@NotNull String projectId, @NotNull Permission... permissions)
Description copied from interface:AccessChecker
Checks authority has all specified permissions in the project.- Specified by:
checkHasPermissionsForProject
in interfaceAccessChecker
-
checkHasPermissionForProjectOrGlobal
public void checkHasPermissionForProjectOrGlobal(@NotNull String projectId, @NotNull Permission projectPermission, @NotNull Permission globalPermission) throws AccessDeniedException
Description copied from interface:AccessChecker
Checks authority has either the project-associated permission in the project or the global permission.- Specified by:
checkHasPermissionForProjectOrGlobal
in interfaceAccessChecker
- Throws:
AccessDeniedException
-
checkHasPermissionForAnyProjectOrGlobal
public void checkHasPermissionForAnyProjectOrGlobal(@NotNull Permission projectPermission, @NotNull Permission globalPermission) throws AccessDeniedException
Description copied from interface:AccessChecker
Checks authority has the project-associated permission in at least one project or the global permission.- Specified by:
checkHasPermissionForAnyProjectOrGlobal
in interfaceAccessChecker
- Throws:
AccessDeniedException
-
checkAdminSpaceAvailable
public void checkAdminSpaceAvailable()
Description copied from interface:AccessChecker
Checks authority can see admin area pages.- Specified by:
checkAdminSpaceAvailable
in interfaceAccessChecker
-
checkCanViewProject
public void checkCanViewProject(@NotNull String projectId) throws AccessDeniedException
- Specified by:
checkCanViewProject
in interfaceAccessChecker
- Throws:
AccessDeniedException
-
checkCanEditProject
public void checkCanEditProject(@NotNull SProject project)
- Specified by:
checkCanEditProject
in interfaceAccessChecker
-
checkCanRemoveProject
public void checkCanRemoveProject(@NotNull SProject project)
- Specified by:
checkCanRemoveProject
in interfaceAccessChecker
-
checkCanEditVcsRoot
public void checkCanEditVcsRoot(@NotNull SVcsRoot vcsRoot)
- Specified by:
checkCanEditVcsRoot
in interfaceAccessChecker
-
checkCanEditTemplate
public void checkCanEditTemplate(@NotNull BuildTypeTemplate template)
- Specified by:
checkCanEditTemplate
in interfaceAccessChecker
-
checkCanEditBuildType
public void checkCanEditBuildType(@NotNull SBuildType buildType)
- Specified by:
checkCanEditBuildType
in interfaceAccessChecker
-
checkCanViewVcsRoot
public void checkCanViewVcsRoot(@NotNull SVcsRoot vcsRoot)
- Specified by:
checkCanViewVcsRoot
in interfaceAccessChecker
-
checkCanCreateRemoveVcsRoot
public void checkCanCreateRemoveVcsRoot(@NotNull SProject project)
- Specified by:
checkCanCreateRemoveVcsRoot
in interfaceAccessChecker
-
checkCanEditFeatureOfType
public void checkCanEditFeatureOfType(@NotNull SProject project, @NotNull String featureType)
- Specified by:
checkCanEditFeatureOfType
in interfaceAccessChecker
-
checkCanCopyProject
public void checkCanCopyProject(@NotNull SProject originalProject, @NotNull SProject parentOfCopy)
- Specified by:
checkCanCopyProject
in interfaceAccessChecker
-
checkCanViewSettings
public void checkCanViewSettings(@NotNull SProject project) throws AccessDeniedException
- Specified by:
checkCanViewSettings
in interfaceAccessChecker
- Throws:
AccessDeniedException
-
checkCanViewSettings
public void checkCanViewSettings(@NotNull SBuildType buildType) throws AccessDeniedException
- Specified by:
checkCanViewSettings
in interfaceAccessChecker
- Throws:
AccessDeniedException
-
checkCanViewBuild
public void checkCanViewBuild(@NotNull Build build) throws AccessDeniedException
- Specified by:
checkCanViewBuild
in interfaceAccessChecker
- Throws:
AccessDeniedException
-
checkCanCreateBuildPromotion
public void checkCanCreateBuildPromotion() throws AccessDeniedException
- Specified by:
checkCanCreateBuildPromotion
in interfaceAccessChecker
- Throws:
AccessDeniedException
- if current node cannot create promotions
-
checkCanRunBuildOnAgent
public void checkCanRunBuildOnAgent(@NotNull BuildType buildType, @Nullable BuildAgent agent)
- Specified by:
checkCanRunBuildOnAgent
in interfaceAccessChecker
-
checkCanRunBuildWithCustomPatch
public void checkCanRunBuildWithCustomPatch(@NotNull BuildType buildType) throws AccessDeniedException
- Specified by:
checkCanRunBuildWithCustomPatch
in interfaceAccessChecker
- Throws:
AccessDeniedException
-
checkCanStopBuild
public void checkCanStopBuild(@NotNull SRunningBuild build)
- Specified by:
checkCanStopBuild
in interfaceAccessChecker
-
checkCanStopBuild
public void checkCanStopBuild(@NotNull SQueuedBuild queuedBuild) throws AccessDeniedException
- Specified by:
checkCanStopBuild
in interfaceAccessChecker
- Throws:
AccessDeniedException
-
checkCanRemoveBuild
public void checkCanRemoveBuild(@NotNull SBuild build)
- Specified by:
checkCanRemoveBuild
in interfaceAccessChecker
-
checkHasPermissionForPool
public void checkHasPermissionForPool(@NotNull AgentPool pool, @NotNull Permission globalPermission, @NotNull Permission poolPermission)
Description copied from interface:AccessChecker
Checks authority has either the project-level permission in all projects associated with the pool or the global permission.- Specified by:
checkHasPermissionForPool
in interfaceAccessChecker
-
checkCanManagePoolProjectAssociations
public void checkCanManagePoolProjectAssociations(@NotNull Set<String> projectIds)
Description copied from interface:AccessChecker
Checks authority can manage agent pools the given projects are associated with- Specified by:
checkCanManagePoolProjectAssociations
in interfaceAccessChecker
-
checkCanAdministerAgent
public void checkCanAdministerAgent(@NotNull SBuildAgent agent)
- Specified by:
checkCanAdministerAgent
in interfaceAccessChecker
-
checkCanViewAgent
public void checkCanViewAgent(@NotNull SBuildAgent agent) throws AccessDeniedException
- Specified by:
checkCanViewAgent
in interfaceAccessChecker
- Throws:
AccessDeniedException
-
checkCanViewAgentPool
public void checkCanViewAgentPool(@NotNull AgentPool agentPool)
- Specified by:
checkCanViewAgentPool
in interfaceAccessChecker
-
checkCanViewAgentDetailsInPool
public void checkCanViewAgentDetailsInPool(@NotNull AgentPool agentPool)
- Specified by:
checkCanViewAgentDetailsInPool
in interfaceAccessChecker
-
checkCanViewAgentTypeDetails
public void checkCanViewAgentTypeDetails(@NotNull SAgentType agentType) throws AccessDeniedException
- Specified by:
checkCanViewAgentTypeDetails
in interfaceAccessChecker
- Throws:
AccessDeniedException
-
checkCanViewUser
public void checkCanViewUser(@NotNull SUser user) throws AccessDeniedException
- Specified by:
checkCanViewUser
in interfaceAccessChecker
- Throws:
AccessDeniedException
-
checkCanViewUserProfile
public void checkCanViewUserProfile(@NotNull SUser user)
- Specified by:
checkCanViewUserProfile
in interfaceAccessChecker
-
checkCanEditUser
public void checkCanEditUser(@NotNull SUser user)
- Specified by:
checkCanEditUser
in interfaceAccessChecker
-
checkCanEditVcsUsername
public void checkCanEditVcsUsername(@NotNull SUser user, String projectId)
- Specified by:
checkCanEditVcsUsername
in interfaceAccessChecker
-
checkCanDeleteUser
public void checkCanDeleteUser(@NotNull SUser user)
- Specified by:
checkCanDeleteUser
in interfaceAccessChecker
-
checkCanChangeUserOrGroupRole
public void checkCanChangeUserOrGroupRole(@NotNull RoleScope scope, @NotNull Role role) throws AccessDeniedException
- Specified by:
checkCanChangeUserOrGroupRole
in interfaceAccessChecker
- Throws:
AccessDeniedException
-
checkCanManageRolesInScope
public void checkCanManageRolesInScope(@NotNull RoleScope scope)
- Specified by:
checkCanManageRolesInScope
in interfaceAccessChecker
-
checkCanAddToRemoveFromGroup
public void checkCanAddToRemoveFromGroup(@NotNull SUserGroup group)
- Specified by:
checkCanAddToRemoveFromGroup
in interfaceAccessChecker
-
checkCanEditNotifications
public void checkCanEditNotifications(@NotNull NotificationRulesHolder notificationRulesHolder)
- Specified by:
checkCanEditNotifications
in interfaceAccessChecker
-
checkCanEditNotification
public void checkCanEditNotification(@NotNull NotificationRulesHolder notificationRulesHolder, @NotNull Collection<String> projectIds) throws AccessDeniedException
- Specified by:
checkCanEditNotification
in interfaceAccessChecker
- Throws:
AccessDeniedException
-
checkCanViewFileContent
public void checkCanViewFileContent(@NotNull String projectId)
- Specified by:
checkCanViewFileContent
in interfaceAccessChecker
-
checkCanViewFileContent
public void checkCanViewFileContent(@NotNull SVcsModification mod)
- Specified by:
checkCanViewFileContent
in interfaceAccessChecker
-
checkCanEditVcsModification
public void checkCanEditVcsModification(@NotNull SVcsModification vcsModification) throws AccessDeniedException
- Specified by:
checkCanEditVcsModification
in interfaceAccessChecker
- Throws:
AccessDeniedException
-
checkCanViewVcsModification
public void checkCanViewVcsModification(@NotNull SVcsModification vcsModification) throws AccessDeniedException
- Specified by:
checkCanViewVcsModification
in interfaceAccessChecker
- Throws:
AccessDeniedException
-
checkCanEditUserGroup
public void checkCanEditUserGroup(@NotNull SUserGroup userGroup)
- Specified by:
checkCanEditUserGroup
in interfaceAccessChecker
-
checkCanDeleteUserGroup
public void checkCanDeleteUserGroup(@NotNull SUserGroup group)
- Specified by:
checkCanDeleteUserGroup
in interfaceAccessChecker
-
-