public class PermissionsControl extends BackdoorControl<PermissionsControl>
BackdoorControl.AddXsrfNoCheckTokenFilter, BackdoorControl.JsonMediaTypeFilter
ADMIN_REST_PATH, API_REST_PATH, DEFAULT_REST_PATH, rootPath
Constructor and Description |
---|
PermissionsControl(BambooEnvironmentData environmentData) |
Modifier and Type | Method and Description |
---|---|
void |
checkPlanPermissions(PlanKey planKey,
BambooRole role,
List<BambooPermission> has,
List<BambooPermission> hasNot) |
void |
grantDeploymentProjectPermission(long deploymentProjectId,
BambooTestPermission permission)
Deprecated.
prefer using
setDeploymentProjectPermissions(java.lang.String, com.atlassian.bamboo.specs.api.builders.permission.Permissions) which is backed by Specs |
void |
grantEnvironmentPermission(long environmentId,
BambooTestPermission permission)
Deprecated.
prefer using
setEnvironmentPermissions(java.lang.String, java.lang.String, com.atlassian.bamboo.specs.api.builders.permission.Permissions) which is backed by Specs |
void |
grantLinkedRepositoryPermission(long repositoryId,
BambooTestPermission permission)
Grant permission to a linked repository.
|
void |
grantPlanPermission(PlanKey planKey,
BambooTestPermission permission)
Deprecated.
|
void |
grantProjectPermission(String projectKey,
BambooTestPermission permission)
Grant project permission
|
void |
grantProjectPlanPermission(String projectKey,
BambooTestPermission permission)
Grant project plan permission
|
boolean |
hasDeploymentProjectPermission(long deploymentProjectId,
BambooTestPermission permission) |
boolean |
hasLinkedRepositoryPermission(long repositoryId,
BambooTestPermission permission)
Check whether a permission is granted on a linked repository.
|
boolean |
hasPlanPermission(PlanKey planKey,
BambooTestPermission permission) |
void |
revokeDeploymentProjectPermission(long deploymentProjectId,
BambooTestPermission permission)
Deprecated.
prefer using
setDeploymentProjectPermissions(java.lang.String, com.atlassian.bamboo.specs.api.builders.permission.Permissions) which is backed by Specs |
void |
revokeEnvironmentPermission(long environmentId,
BambooTestPermission permission)
Deprecated.
prefer using
setEnvironmentPermissions(java.lang.String, java.lang.String, com.atlassian.bamboo.specs.api.builders.permission.Permissions) which is backed by Specs |
void |
revokeLinkedRepositoryPermission(long repositoryId,
BambooTestPermission permission)
Revoke permission to a linked repository.
|
void |
revokePlanPermission(PlanKey planKey,
BambooTestPermission permission)
Deprecated.
|
void |
revokeProjectPermission(String projectKey,
BambooTestPermission permission)
Revoke project permission
|
void |
setDeploymentProjectPermissions(String deploymentProjectName,
com.atlassian.bamboo.specs.api.builders.permission.Permissions permissions)
Sets deployment project permissions
|
void |
setEnvironmentPermissions(String deploymentProjectName,
String environmentName,
com.atlassian.bamboo.specs.api.builders.permission.Permissions permissions)
Sets deployment environment permissions
|
void |
setPlanPermissions(PlanKey planKey,
com.atlassian.bamboo.specs.api.builders.permission.Permissions permissions)
Set complete plan permissions
|
void |
setPlanPermissions(com.atlassian.bamboo.specs.api.builders.permission.PlanPermissions permissions)
Set complete plan permissions
|
client, createResource, createResourceForPath, get, getEnvironmentData, getRestModulePath, percentEncode, ping, post, resourceRoot, tearDown
public PermissionsControl(@NotNull BambooEnvironmentData environmentData)
public void grantProjectPermission(@NotNull String projectKey, @NotNull BambooTestPermission permission)
projectKey
- key of a Projectpermission
- permission to grantpublic void revokeProjectPermission(@NotNull String projectKey, @NotNull BambooTestPermission permission)
projectKey
- key of a Projectpermission
- permission to revokepublic void grantProjectPlanPermission(@NotNull String projectKey, @NotNull BambooTestPermission permission)
projectKey
- key of a Projectpermission
- permission to grant@Deprecated public void grantPlanPermission(@NotNull PlanKey planKey, @NotNull BambooTestPermission permission)
setPlanPermissions(PlanPermissions)
or setPlanPermissions(PlanKey, Permissions)
planKey
- key of a Planpermission
- permission to grant@Deprecated public void revokePlanPermission(@NotNull PlanKey planKey, @NotNull BambooTestPermission permission)
setPlanPermissions(PlanPermissions)
or setPlanPermissions(PlanKey, Permissions)
planKey
- key of a Planpermission
- permission to revokepublic void setPlanPermissions(@NotNull com.atlassian.bamboo.specs.api.builders.permission.PlanPermissions permissions)
permissions
- new plan permission schemepublic void setPlanPermissions(@NotNull PlanKey planKey, @NotNull com.atlassian.bamboo.specs.api.builders.permission.Permissions permissions)
planKey
- key of a Planpermissions
- new plan permission schemepublic boolean hasPlanPermission(@NotNull PlanKey planKey, @NotNull BambooTestPermission permission)
public void checkPlanPermissions(PlanKey planKey, BambooRole role, List<BambooPermission> has, List<BambooPermission> hasNot)
public boolean hasDeploymentProjectPermission(long deploymentProjectId, @NotNull BambooTestPermission permission)
public void grantLinkedRepositoryPermission(long repositoryId, @NotNull BambooTestPermission permission)
repositoryId
- id of repositorypermission
- permission to grantpublic void revokeLinkedRepositoryPermission(long repositoryId, @NotNull BambooTestPermission permission)
repositoryId
- id of repositorypermission
- permission to revokepublic boolean hasLinkedRepositoryPermission(long repositoryId, @NotNull BambooTestPermission permission)
repositoryId
- id of repositorypermission
- permission to check@Deprecated public void grantDeploymentProjectPermission(long deploymentProjectId, @NotNull BambooTestPermission permission)
setDeploymentProjectPermissions(java.lang.String, com.atlassian.bamboo.specs.api.builders.permission.Permissions)
which is backed by SpecsdeploymentProjectId
- id of deployment projectpermission
- permission to setpublic void setDeploymentProjectPermissions(@NotNull String deploymentProjectName, @NotNull com.atlassian.bamboo.specs.api.builders.permission.Permissions permissions)
deploymentProjectName
- deployment project namepermissions
- new permission set@Deprecated public void revokeDeploymentProjectPermission(long deploymentProjectId, @NotNull BambooTestPermission permission)
setDeploymentProjectPermissions(java.lang.String, com.atlassian.bamboo.specs.api.builders.permission.Permissions)
which is backed by SpecsdeploymentProjectId
- id of deployment projectpermission
- permission to revoke@Deprecated public void grantEnvironmentPermission(long environmentId, @NotNull BambooTestPermission permission)
setEnvironmentPermissions(java.lang.String, java.lang.String, com.atlassian.bamboo.specs.api.builders.permission.Permissions)
which is backed by SpecsenvironmentId
- id of deployment environmentpermission
- permission to setpublic void setEnvironmentPermissions(@NotNull String deploymentProjectName, @NotNull String environmentName, @NotNull com.atlassian.bamboo.specs.api.builders.permission.Permissions permissions)
deploymentProjectName
- deployment project nameenvironmentName
- environment namepermissions
- new permission set@Deprecated public void revokeEnvironmentPermission(long environmentId, @NotNull BambooTestPermission permission)
setEnvironmentPermissions(java.lang.String, java.lang.String, com.atlassian.bamboo.specs.api.builders.permission.Permissions)
which is backed by SpecsenvironmentId
- id of deployment environmentpermission
- permission to revokeCopyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.