Package com.atlassian.bamboo.specs
Interface RssPermissionManager
- All Known Implementing Classes:
RssPermissionManagerImpl
public interface RssPermissionManager
-
Method Summary
Modifier and TypeMethodDescriptionvoid
disableAllProjectAccess
(long repositoryId) Forbid Bamboo Specs stored in the repository identified byrepositoryId
to create or modify plans in all projects and deployment projects in Bamboo.void
disableAllRepositoriesAccess
(long repositoryId) Forbid Bamboo Specs stored in the repository identified byrepositoryId
to use any linked repositories in Bamboo.void
disableProjectCreation
(long repositoryId) Forbid Bamboo Specs stored in the repository identified byrepositoryId
to 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
.void
grantDeploymentProjectAccess
(long projectId, long repositoryId) Allow Bamboo Specs stored in the repository identified byrepositoryId
to modify a deployment project identified byprojectId
.void
grantProjectAccess
(long projectId, long repositoryId) Allow Bamboo Specs stored in the repository identified byrepositoryId
to modify plans in a project identified byprojectId
.void
grantRepositoryAccess
(long targetRepositoryId, long repositoryId) Allow Bamboo Specs stored in the repository identified byrepositoryId
to use repository identified bytargetRepositoryId
.boolean
isAllProjectsAccess
(long repositoryId) Whether a Bamboo Specs stored in the repository identified byrepositoryId
to modify all projects.boolean
isAllRepositoriesAccess
(long repositoryId) Whether a Bamboo Specs stored in the repository identified byrepositoryId
to use all repositories.boolean
isProjectCreationAllowed
(long repositoryId) Whether a Bamboo Specs stored in the repository identified byrepositoryId
are allowed to create new build and deployment projects.void
revokeDeploymentProjectAccess
(long projectId, long repositoryId) Forbid Bamboo Specs stored in the repository identified byrepositoryId
to modify a deployment project identified byprojectId
.void
revokeProjectAccess
(long projectId, long repositoryId) Forbid Bamboo Specs stored in the repository identified byrepositoryId
to modify plans in a project identified byprojectId
.void
revokeRepositoryAccess
(long targetRepositoryId, long repositoryId) Forbid Bamboo Specs stored in the repository identified byrepositoryId
to use a repository identified bytargetRepositoryId
.void
toggleAllProjectRepositoriesAccess
(long repositoryId, @NotNull String projectKey, boolean enabled) Allow or forbid Bamboo Specs stored in the repository identified byrepositoryId
to use all project repositories in plan of project.void
toggleAllProjectsAccess
(long repositoryId, boolean enabled) Allow or forbid Bamboo Specs stored in the repository identified byrepositoryId
to create or modify plans in all projects and deployment projects in Bamboo.void
toggleAllRepositoriesAccess
(long repositoryId, boolean enable) Allow or forbid Bamboo Specs stored in the repository identified byrepositoryId
to use all linked repositories in plans or deployment projects in Bamboo.void
toggleProjectCreationPermission
(long repositoryId, boolean enabled) Allow or forbid Bamboo Specs stored in the repository identified byrepositoryId
to 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 byrepositoryId
to 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 byrepositoryId
to 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 byrepositoryId
to 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 byrepositoryId
to 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 byrepositoryId
to 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 byrepositoryId
to 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 byrepositoryId
to 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 byrepositoryId
to 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 byrepositoryId
are 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 byrepositoryId
to 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 byrepositoryId
to 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 byrepositoryId
to 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 byrepositoryId
to 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 byrepositoryId
to 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 byrepositoryId
to 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 byrepositoryId
to create new projects. This method does not check permissions.- Parameters:
repositoryId
- id of the repository
-