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 voidcheckAdminSpaceAvailable()Checks authority can see admin area pages.voidcheckCanAddToRemoveFromGroup(SUserGroup group)voidcheckCanAdministerAgent(SBuildAgent agent)voidcheckCanChangeUserOrGroupRole(RoleScope scope, Role role)voidcheckCanCopyProject(SProject originalProject, SProject parentOfCopy)voidcheckCanCreateBuildPromotion()voidcheckCanCreateRemoveVcsRoot(SProject project)voidcheckCanDeleteUser(SUser user)voidcheckCanDeleteUserGroup(SUserGroup group)voidcheckCanEditBuildType(SBuildType buildType)voidcheckCanEditFeatureOfType(SProject project, String featureType)voidcheckCanEditNotification(NotificationRulesHolder notificationRulesHolder, Collection<String> projectIds)voidcheckCanEditNotifications(NotificationRulesHolder notificationRulesHolder)voidcheckCanEditProject(SProject project)voidcheckCanEditTemplate(BuildTypeTemplate template)voidcheckCanEditUser(SUser user)voidcheckCanEditUserGroup(SUserGroup userGroup)voidcheckCanEditVcsModification(SVcsModification vcsModification)voidcheckCanEditVcsRoot(SVcsRoot vcsRoot)voidcheckCanEditVcsUsername(SUser user, String projectId)voidcheckCanManagePoolProjectAssociations(Set<String> projectIds)Checks authority can manage agent pools the given projects are associated withvoidcheckCanManageRolesInScope(RoleScope scope)voidcheckCanRemoveBuild(SBuild build)voidcheckCanRemoveProject(SProject project)voidcheckCanRunBuildOnAgent(BuildType buildType, BuildAgent agent)voidcheckCanRunBuildWithCustomPatch(BuildType buildType)voidcheckCanStopBuild(SQueuedBuild queuedBuild)voidcheckCanStopBuild(SRunningBuild build)voidcheckCanViewAgent(SBuildAgent agent)voidcheckCanViewAgentDetailsInPool(AgentPool agentPool)voidcheckCanViewAgentPool(AgentPool agentPool)voidcheckCanViewAgentTypeDetails(SAgentType agentType)voidcheckCanViewBuild(Build build)voidcheckCanViewFileContent(String projectId)voidcheckCanViewFileContent(SVcsModification mod)voidcheckCanViewProject(String projectId)voidcheckCanViewSettings(SBuildType buildType)voidcheckCanViewSettings(SProject project)voidcheckCanViewUser(SUser user)voidcheckCanViewUserProfile(SUser user)voidcheckCanViewVcsModification(SVcsModification vcsModification)voidcheckCanViewVcsRoot(SVcsRoot vcsRoot)voidcheckHasAnyPermissionForProject(String projectId, Permission... permissions)Checks authority has at least one of the specified permissions in the project.voidcheckHasGlobalPermission(Permission... permissions)Checks authority has all the specified permissions assigned globally.voidcheckHasPermissionForAnyProject(Permission permission)Checks authority has the specified permission in at least one project.voidcheckHasPermissionForAnyProjectOrGlobal(Permission projectPermission, Permission globalPermission)Checks authority has the project-associated permission in at least one project or the global permission.voidcheckHasPermissionForPool(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.voidcheckHasPermissionForProjectOrGlobal(String projectId, Permission projectPermission, Permission globalPermission)Checks authority has either the project-associated permission in the project or the global permission.voidcheckHasPermissionsForProject(String projectId, Permission... permissions)Checks authority has all specified permissions in the project.voidsetSecurityContext(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:AccessCheckerChecks authority has all the specified permissions assigned globally.- Specified by:
checkHasGlobalPermissionin interfaceAccessChecker
-
checkHasPermissionForAnyProject
public void checkHasPermissionForAnyProject(@NotNull Permission permission)Description copied from interface:AccessCheckerChecks authority has the specified permission in at least one project.- Specified by:
checkHasPermissionForAnyProjectin interfaceAccessChecker
-
checkHasAnyPermissionForProject
public void checkHasAnyPermissionForProject(@NotNull String projectId, @NotNull Permission... permissions) throws AccessDeniedExceptionDescription copied from interface:AccessCheckerChecks authority has at least one of the specified permissions in the project.- Specified by:
checkHasAnyPermissionForProjectin interfaceAccessChecker- Throws:
AccessDeniedException
-
checkHasPermissionsForProject
public void checkHasPermissionsForProject(@NotNull String projectId, @NotNull Permission... permissions)Description copied from interface:AccessCheckerChecks authority has all specified permissions in the project.- Specified by:
checkHasPermissionsForProjectin interfaceAccessChecker
-
checkHasPermissionForProjectOrGlobal
public void checkHasPermissionForProjectOrGlobal(@NotNull String projectId, @NotNull Permission projectPermission, @NotNull Permission globalPermission) throws AccessDeniedExceptionDescription copied from interface:AccessCheckerChecks authority has either the project-associated permission in the project or the global permission.- Specified by:
checkHasPermissionForProjectOrGlobalin interfaceAccessChecker- Throws:
AccessDeniedException
-
checkHasPermissionForAnyProjectOrGlobal
public void checkHasPermissionForAnyProjectOrGlobal(@NotNull Permission projectPermission, @NotNull Permission globalPermission) throws AccessDeniedExceptionDescription copied from interface:AccessCheckerChecks authority has the project-associated permission in at least one project or the global permission.- Specified by:
checkHasPermissionForAnyProjectOrGlobalin interfaceAccessChecker- Throws:
AccessDeniedException
-
checkAdminSpaceAvailable
public void checkAdminSpaceAvailable()
Description copied from interface:AccessCheckerChecks authority can see admin area pages.- Specified by:
checkAdminSpaceAvailablein interfaceAccessChecker
-
checkCanViewProject
public void checkCanViewProject(@NotNull String projectId) throws AccessDeniedException- Specified by:
checkCanViewProjectin interfaceAccessChecker- Throws:
AccessDeniedException
-
checkCanEditProject
public void checkCanEditProject(@NotNull SProject project)- Specified by:
checkCanEditProjectin interfaceAccessChecker
-
checkCanRemoveProject
public void checkCanRemoveProject(@NotNull SProject project)- Specified by:
checkCanRemoveProjectin interfaceAccessChecker
-
checkCanEditVcsRoot
public void checkCanEditVcsRoot(@NotNull SVcsRoot vcsRoot)- Specified by:
checkCanEditVcsRootin interfaceAccessChecker
-
checkCanEditTemplate
public void checkCanEditTemplate(@NotNull BuildTypeTemplate template)- Specified by:
checkCanEditTemplatein interfaceAccessChecker
-
checkCanEditBuildType
public void checkCanEditBuildType(@NotNull SBuildType buildType)- Specified by:
checkCanEditBuildTypein interfaceAccessChecker
-
checkCanViewVcsRoot
public void checkCanViewVcsRoot(@NotNull SVcsRoot vcsRoot)- Specified by:
checkCanViewVcsRootin interfaceAccessChecker
-
checkCanCreateRemoveVcsRoot
public void checkCanCreateRemoveVcsRoot(@NotNull SProject project)- Specified by:
checkCanCreateRemoveVcsRootin interfaceAccessChecker
-
checkCanEditFeatureOfType
public void checkCanEditFeatureOfType(@NotNull SProject project, @NotNull String featureType)- Specified by:
checkCanEditFeatureOfTypein interfaceAccessChecker
-
checkCanCopyProject
public void checkCanCopyProject(@NotNull SProject originalProject, @NotNull SProject parentOfCopy)- Specified by:
checkCanCopyProjectin interfaceAccessChecker
-
checkCanViewSettings
public void checkCanViewSettings(@NotNull SProject project) throws AccessDeniedException- Specified by:
checkCanViewSettingsin interfaceAccessChecker- Throws:
AccessDeniedException
-
checkCanViewSettings
public void checkCanViewSettings(@NotNull SBuildType buildType) throws AccessDeniedException- Specified by:
checkCanViewSettingsin interfaceAccessChecker- Throws:
AccessDeniedException
-
checkCanViewBuild
public void checkCanViewBuild(@NotNull Build build) throws AccessDeniedException- Specified by:
checkCanViewBuildin interfaceAccessChecker- Throws:
AccessDeniedException
-
checkCanCreateBuildPromotion
public void checkCanCreateBuildPromotion() throws AccessDeniedException- Specified by:
checkCanCreateBuildPromotionin interfaceAccessChecker- Throws:
AccessDeniedException- if current node cannot create promotions
-
checkCanRunBuildOnAgent
public void checkCanRunBuildOnAgent(@NotNull BuildType buildType, @Nullable BuildAgent agent)- Specified by:
checkCanRunBuildOnAgentin interfaceAccessChecker
-
checkCanRunBuildWithCustomPatch
public void checkCanRunBuildWithCustomPatch(@NotNull BuildType buildType) throws AccessDeniedException- Specified by:
checkCanRunBuildWithCustomPatchin interfaceAccessChecker- Throws:
AccessDeniedException
-
checkCanStopBuild
public void checkCanStopBuild(@NotNull SRunningBuild build)- Specified by:
checkCanStopBuildin interfaceAccessChecker
-
checkCanStopBuild
public void checkCanStopBuild(@NotNull SQueuedBuild queuedBuild) throws AccessDeniedException- Specified by:
checkCanStopBuildin interfaceAccessChecker- Throws:
AccessDeniedException
-
checkCanRemoveBuild
public void checkCanRemoveBuild(@NotNull SBuild build)- Specified by:
checkCanRemoveBuildin interfaceAccessChecker
-
checkHasPermissionForPool
public void checkHasPermissionForPool(@NotNull AgentPool pool, @NotNull Permission globalPermission, @NotNull Permission poolPermission)Description copied from interface:AccessCheckerChecks authority has either the project-level permission in all projects associated with the pool or the global permission.- Specified by:
checkHasPermissionForPoolin interfaceAccessChecker
-
checkCanManagePoolProjectAssociations
public void checkCanManagePoolProjectAssociations(@NotNull Set<String> projectIds)Description copied from interface:AccessCheckerChecks authority can manage agent pools the given projects are associated with- Specified by:
checkCanManagePoolProjectAssociationsin interfaceAccessChecker
-
checkCanAdministerAgent
public void checkCanAdministerAgent(@NotNull SBuildAgent agent)- Specified by:
checkCanAdministerAgentin interfaceAccessChecker
-
checkCanViewAgent
public void checkCanViewAgent(@NotNull SBuildAgent agent) throws AccessDeniedException- Specified by:
checkCanViewAgentin interfaceAccessChecker- Throws:
AccessDeniedException
-
checkCanViewAgentPool
public void checkCanViewAgentPool(@NotNull AgentPool agentPool)- Specified by:
checkCanViewAgentPoolin interfaceAccessChecker
-
checkCanViewAgentDetailsInPool
public void checkCanViewAgentDetailsInPool(@NotNull AgentPool agentPool)- Specified by:
checkCanViewAgentDetailsInPoolin interfaceAccessChecker
-
checkCanViewAgentTypeDetails
public void checkCanViewAgentTypeDetails(@NotNull SAgentType agentType) throws AccessDeniedException- Specified by:
checkCanViewAgentTypeDetailsin interfaceAccessChecker- Throws:
AccessDeniedException
-
checkCanViewUser
public void checkCanViewUser(@NotNull SUser user) throws AccessDeniedException- Specified by:
checkCanViewUserin interfaceAccessChecker- Throws:
AccessDeniedException
-
checkCanViewUserProfile
public void checkCanViewUserProfile(@NotNull SUser user)- Specified by:
checkCanViewUserProfilein interfaceAccessChecker
-
checkCanEditUser
public void checkCanEditUser(@NotNull SUser user)- Specified by:
checkCanEditUserin interfaceAccessChecker
-
checkCanEditVcsUsername
public void checkCanEditVcsUsername(@NotNull SUser user, String projectId)- Specified by:
checkCanEditVcsUsernamein interfaceAccessChecker
-
checkCanDeleteUser
public void checkCanDeleteUser(@NotNull SUser user)- Specified by:
checkCanDeleteUserin interfaceAccessChecker
-
checkCanChangeUserOrGroupRole
public void checkCanChangeUserOrGroupRole(@NotNull RoleScope scope, @NotNull Role role) throws AccessDeniedException- Specified by:
checkCanChangeUserOrGroupRolein interfaceAccessChecker- Throws:
AccessDeniedException
-
checkCanManageRolesInScope
public void checkCanManageRolesInScope(@NotNull RoleScope scope)- Specified by:
checkCanManageRolesInScopein interfaceAccessChecker
-
checkCanAddToRemoveFromGroup
public void checkCanAddToRemoveFromGroup(@NotNull SUserGroup group)- Specified by:
checkCanAddToRemoveFromGroupin interfaceAccessChecker
-
checkCanEditNotifications
public void checkCanEditNotifications(@NotNull NotificationRulesHolder notificationRulesHolder)- Specified by:
checkCanEditNotificationsin interfaceAccessChecker
-
checkCanEditNotification
public void checkCanEditNotification(@NotNull NotificationRulesHolder notificationRulesHolder, @NotNull Collection<String> projectIds) throws AccessDeniedException- Specified by:
checkCanEditNotificationin interfaceAccessChecker- Throws:
AccessDeniedException
-
checkCanViewFileContent
public void checkCanViewFileContent(@NotNull String projectId)- Specified by:
checkCanViewFileContentin interfaceAccessChecker
-
checkCanViewFileContent
public void checkCanViewFileContent(@NotNull SVcsModification mod)- Specified by:
checkCanViewFileContentin interfaceAccessChecker
-
checkCanEditVcsModification
public void checkCanEditVcsModification(@NotNull SVcsModification vcsModification) throws AccessDeniedException- Specified by:
checkCanEditVcsModificationin interfaceAccessChecker- Throws:
AccessDeniedException
-
checkCanViewVcsModification
public void checkCanViewVcsModification(@NotNull SVcsModification vcsModification) throws AccessDeniedException- Specified by:
checkCanViewVcsModificationin interfaceAccessChecker- Throws:
AccessDeniedException
-
checkCanEditUserGroup
public void checkCanEditUserGroup(@NotNull SUserGroup userGroup)- Specified by:
checkCanEditUserGroupin interfaceAccessChecker
-
checkCanDeleteUserGroup
public void checkCanDeleteUserGroup(@NotNull SUserGroup group)- Specified by:
checkCanDeleteUserGroupin interfaceAccessChecker
-
-