Package com.atlassian.bamboo.specs
Interface RssPermissionManager
- All Known Implementing Classes:
RssPermissionManagerImpl
public interface RssPermissionManager
-
Method Summary
Modifier and TypeMethodDescriptionvoiddisableAllProjectAccess(long repositoryId) Forbid Bamboo Specs stored in the repository identified byrepositoryIdto create or modify plans in all projects and deployment projects in Bamboo.voiddisableAllRepositoriesAccess(long repositoryId) Forbid Bamboo Specs stored in the repository identified byrepositoryIdto use any linked repositories in Bamboo.voiddisableProjectCreation(long repositoryId) Forbid Bamboo Specs stored in the repository identified byrepositoryIdto create new projects.getAccessibleDeploymentProjects(long repositoryId) List all deployment projects which can be created or modified by the Bamboo Specs from a repository identified byrepositoryId.getAccessibleProjects(long repositoryId) List all build projects in which plans can be created or modified by the Bamboo Specs from a repository identified byrepositoryId.getAccessibleRepositories(long repositoryId) List all repositories which can be used by the Bamboo Specs from a repository identified byrepositoryId.getRepositoriesWithAccessToDeploymentProject(long projectId) List all repositories which are allowed to create or modify plans inside a deployment project identified byprojectId.getRepositoriesWithAccessToProject(long projectId) List all repositories which are allowed to create or modify plans inside a build project identified byprojectId.getRepositoriesWithAccessToRepository(long targetRepositoryId) List all repositories which are allowed to use target repository identified bytargetRepositoryId.voidgrantDeploymentProjectAccess(long projectId, long repositoryId) Allow Bamboo Specs stored in the repository identified byrepositoryIdto modify a deployment project identified byprojectId.voidgrantProjectAccess(long projectId, long repositoryId) Allow Bamboo Specs stored in the repository identified byrepositoryIdto modify plans in a project identified byprojectId.voidgrantRepositoryAccess(long targetRepositoryId, long repositoryId) Allow Bamboo Specs stored in the repository identified byrepositoryIdto use repository identified bytargetRepositoryId.booleanisAllProjectsAccess(long repositoryId) Whether a Bamboo Specs stored in the repository identified byrepositoryIdto modify all projects.booleanisAllRepositoriesAccess(long repositoryId) Whether a Bamboo Specs stored in the repository identified byrepositoryIdto use all repositories.booleanisProjectCreationAllowed(long repositoryId) Whether a Bamboo Specs stored in the repository identified byrepositoryIdare allowed to create new build and deployment projects.voidrevokeDeploymentProjectAccess(long projectId, long repositoryId) Forbid Bamboo Specs stored in the repository identified byrepositoryIdto modify a deployment project identified byprojectId.voidrevokeProjectAccess(long projectId, long repositoryId) Forbid Bamboo Specs stored in the repository identified byrepositoryIdto modify plans in a project identified byprojectId.voidrevokeRepositoryAccess(long targetRepositoryId, long repositoryId) Forbid Bamboo Specs stored in the repository identified byrepositoryIdto use a repository identified bytargetRepositoryId.voidtoggleAllProjectRepositoriesAccess(long repositoryId, @NotNull String projectKey, boolean enabled) Allow or forbid Bamboo Specs stored in the repository identified byrepositoryIdto use all project repositories in plan of project.voidtoggleAllProjectsAccess(long repositoryId, boolean enabled) Allow or forbid Bamboo Specs stored in the repository identified byrepositoryIdto create or modify plans in all projects and deployment projects in Bamboo.voidtoggleAllRepositoriesAccess(long repositoryId, boolean enable) Allow or forbid Bamboo Specs stored in the repository identified byrepositoryIdto use all linked repositories in plans or deployment projects in Bamboo.voidtoggleProjectCreationPermission(long repositoryId, boolean enabled) Allow or forbid Bamboo Specs stored in the repository identified byrepositoryIdto create new build and deployment projects.
-
Method Details
-
getAccessibleProjects
List all build projects in which plans can be created or modified by the Bamboo Specs from a repository identified byrepositoryId.- Parameters:
repositoryId- ID of the repository- Returns:
- list of project IDs
-
getAccessibleDeploymentProjects
List all deployment projects which can be created or modified by the Bamboo Specs from a repository identified byrepositoryId.- Parameters:
repositoryId- ID of the repository- Returns:
- list of project IDs
-
getAccessibleRepositories
List all repositories which can be used by the Bamboo Specs from a repository identified byrepositoryId.- Parameters:
repositoryId- ID of the repository- Returns:
- list of vcs repository IDs
-
getRepositoriesWithAccessToProject
List all repositories which are allowed to create or modify plans inside a build project identified byprojectId.- Parameters:
projectId- ID of the project- Returns:
- list of repository IDs
-
getRepositoriesWithAccessToDeploymentProject
List all repositories which are allowed to create or modify plans inside a deployment project identified byprojectId.- Parameters:
projectId- ID of the project- Returns:
- list of repository IDs
-
getRepositoriesWithAccessToRepository
List all repositories which are allowed to use target repository identified bytargetRepositoryId.- Parameters:
targetRepositoryId- ID of the repository- Returns:
- list of repository IDs
-
grantProjectAccess
Allow Bamboo Specs stored in the repository identified byrepositoryIdto modify plans in a project identified byprojectId.- Parameters:
projectId- id of the projectrepositoryId- id of the repository- Throws:
AccessDeniedException- if user doesn't have ADMINISTRATION permission to project or READ permission to repository
-
grantDeploymentProjectAccess
Allow Bamboo Specs stored in the repository identified byrepositoryIdto modify a deployment project identified byprojectId.- Parameters:
repositoryId- id of the repositoryprojectId- id of the project- Throws:
AccessDeniedException- if user doesn't have ADMINISTRATION permission to deployment project or READ permission to repository
-
grantRepositoryAccess
void grantRepositoryAccess(long targetRepositoryId, long repositoryId) Allow Bamboo Specs stored in the repository identified byrepositoryIdto use repository identified bytargetRepositoryId.- Parameters:
targetRepositoryId- id of the target repositoryrepositoryId- id of the repository- Throws:
AccessDeniedException- if user doesn't have ADMINISTRATION permission to target repository or READ permission to repository
-
revokeProjectAccess
Forbid Bamboo Specs stored in the repository identified byrepositoryIdto modify plans in a project identified byprojectId.- Parameters:
projectId- id of the projectrepositoryId- id of the repository- Throws:
AccessDeniedException- if user doesn't have ADMINISTRATION permission to project
-
revokeDeploymentProjectAccess
Forbid Bamboo Specs stored in the repository identified byrepositoryIdto modify a deployment project identified byprojectId.- Parameters:
projectId- id of the projectrepositoryId- id of the repository- Throws:
AccessDeniedException- if user doesn't have ADMINISTRATION permission to deployment project
-
revokeRepositoryAccess
void revokeRepositoryAccess(long targetRepositoryId, long repositoryId) throws AccessDeniedException Forbid Bamboo Specs stored in the repository identified byrepositoryIdto use a repository identified bytargetRepositoryId.- Parameters:
targetRepositoryId- id of the target repositoryrepositoryId- id of the repository- Throws:
AccessDeniedException- if user doesn't have ADMINISTRATION permission to target repository
-
isAllProjectsAccess
Whether a Bamboo Specs stored in the repository identified byrepositoryIdto modify all projects.- Parameters:
repositoryId- id of the repository- Returns:
- boolean
- Throws:
AccessDeniedException- if user doesn't have READ permission to repository
-
isAllRepositoriesAccess
Whether a Bamboo Specs stored in the repository identified byrepositoryIdto use all repositories.- Parameters:
repositoryId- id of the repository- Returns:
- boolean
- Throws:
AccessDeniedException- if user doesn't have READ permission to repository
-
isProjectCreationAllowed
Whether a Bamboo Specs stored in the repository identified byrepositoryIdare allowed to create new build and deployment projects.- Parameters:
repositoryId- id of the repository- Returns:
- boolean
- Throws:
AccessDeniedException- if user doesn't have READ permission to repository
-
toggleAllProjectsAccess
Allow or forbid Bamboo Specs stored in the repository identified byrepositoryIdto create or modify plans in all projects and deployment projects in Bamboo. IMPORTANT: this method switches the global toggle, so calling this method does not remove permissions from single projects is any were granted using thegrantProjectAccess(long, long)orgrantDeploymentProjectAccess(long, long). Therefore, if you want to completely revoke access you shall also:- iterate over
getAccessibleProjects(long)and callrevokeProjectAccess(long, long) - iterate over
getAccessibleDeploymentProjects(long)and callrevokeDeploymentProjectAccess(long, long)
- Parameters:
repositoryId- id of the repository- Throws:
AccessDeniedException- if user doesn't have ADMINISTRATION or RESTRICTEDADMINISTRATION global permission
- iterate over
-
toggleAllRepositoriesAccess
Allow or forbid Bamboo Specs stored in the repository identified byrepositoryIdto use all linked repositories in plans or deployment projects in Bamboo. IMPORTANT: this method switches the global toggle, so calling this method does not remove permissions from single repository is any were granted using thegrantProjectAccess(long, long)orgrantDeploymentProjectAccess(long, long). Therefore, if you want to completely revoke access you shall also: iterate overgetAccessibleRepositories(long)(long)} and callrevokeRepositoryAccess(long, long)- Parameters:
repositoryId- id of the repository- Throws:
AccessDeniedException- if user doesn't have ADMINISTRATION or RESTRICTEDADMINISTRATION global permission
-
toggleAllProjectRepositoriesAccess
void toggleAllProjectRepositoriesAccess(long repositoryId, @NotNull @NotNull String projectKey, boolean enabled) Allow or forbid Bamboo Specs stored in the repository identified byrepositoryIdto use all project repositories in plan of project. IMPORTANT: this method switches the global toggle, so calling this method does not remove permissions from single repository is any were granted using thegrantProjectAccess(long, long)orgrantDeploymentProjectAccess(long, long). Therefore, if you want to completely revoke access you shall also: iterate overgetAccessibleRepositories(long)(long)} and callrevokeRepositoryAccess(long, long)- Parameters:
repositoryId- id of the repositoryprojectKey- key of project- Throws:
AccessDeniedException- if user doesn't have ADMINISTRATION permission on project
-
toggleProjectCreationPermission
void toggleProjectCreationPermission(long repositoryId, boolean enabled) Allow or forbid Bamboo Specs stored in the repository identified byrepositoryIdto create new build and deployment projects.- Parameters:
repositoryId- id of the repository- Throws:
AccessDeniedException- if user doesn't have CREATE global permission
-
disableAllProjectAccess
void disableAllProjectAccess(long repositoryId) Forbid Bamboo Specs stored in the repository identified byrepositoryIdto create or modify plans in all projects and deployment projects in Bamboo. IMPORTANT: this method switches the global toggle, so calling this method does not remove permissions from single projects is any were granted using thegrantProjectAccess(long, long)orgrantDeploymentProjectAccess(long, long). Therefore, if you want to completely revoke access you shall also:- iterate over
getAccessibleProjects(long)and callrevokeProjectAccess(long, long) - iterate over
getAccessibleDeploymentProjects(long)and callrevokeDeploymentProjectAccess(long, long)
- Parameters:
repositoryId- id of the repository
- iterate over
-
disableAllRepositoriesAccess
void disableAllRepositoriesAccess(long repositoryId) Forbid Bamboo Specs stored in the repository identified byrepositoryIdto use any linked repositories in Bamboo. IMPORTANT: this method switches the global toggle, so calling this method does not remove permissions from single repositories is any were granted using the#grantRepositoryAccess(long, Long)orgrantDeploymentProjectAccess(long, long). Therefore, if you want to completely revoke access you shall also:- iterate over
getAccessibleRepositories(long)and callrevokeRepositoryAccess(long, long)
- Parameters:
repositoryId- id of the repository
- iterate over
-
disableProjectCreation
void disableProjectCreation(long repositoryId) Forbid Bamboo Specs stored in the repository identified byrepositoryIdto create new projects. This method does not check permissions.- Parameters:
repositoryId- id of the repository
-