Class PermissionsControl
- java.lang.Object
-
- com.atlassian.bamboo.testutils.backdoor.BackdoorControl<PermissionsControl>
-
- com.atlassian.bamboo.testutils.backdoor.PermissionsControl
-
public class PermissionsControl extends BackdoorControl<PermissionsControl>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.atlassian.bamboo.testutils.backdoor.BackdoorControl
BackdoorControl.AddXsrfNoCheckTokenFilter, BackdoorControl.JsonMediaTypeFilter
-
-
Field Summary
-
Fields inherited from class com.atlassian.bamboo.testutils.backdoor.BackdoorControl
ADMIN_REST_PATH, API_REST_PATH, DEFAULT_REST_PATH, rootPath
-
-
Constructor Summary
Constructors Constructor Description PermissionsControl(@NotNull BambooEnvironmentData environmentData)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
checkPlanPermissions(PlanKey planKey, BambooRole role, List<BambooPermission> has, List<BambooPermission> hasNot)
void
grantDeploymentProjectPermission(long deploymentProjectId, @NotNull BambooTestPermission permission)
Deprecated.prefer usingsetDeploymentProjectPermissions(java.lang.String, com.atlassian.bamboo.specs.api.builders.permission.Permissions)
which is backed by Specsvoid
grantEnvironmentPermission(long environmentId, @NotNull BambooTestPermission permission)
Deprecated.prefer usingsetEnvironmentPermissions(java.lang.String, java.lang.String, com.atlassian.bamboo.specs.api.builders.permission.Permissions)
which is backed by Specsvoid
grantLinkedRepositoryPermission(long repositoryId, @NotNull BambooTestPermission permission)
Grant permission to a linked repository.void
grantPlanPermission(@NotNull PlanKey planKey, @NotNull BambooTestPermission permission)
Deprecated.void
grantProjectPermission(@NotNull String projectKey, @NotNull BambooTestPermission permission)
Grant project permissionvoid
grantProjectPlanPermission(@NotNull String projectKey, @NotNull BambooTestPermission permission)
Grant project plan permissionboolean
hasDeploymentProjectPermission(long deploymentProjectId, @NotNull BambooTestPermission permission)
boolean
hasLinkedRepositoryPermission(long repositoryId, @NotNull BambooTestPermission permission)
Check whether a permission is granted on a linked repository.boolean
hasPlanPermission(@NotNull PlanKey planKey, @NotNull BambooTestPermission permission)
void
revokeDeploymentProjectPermission(long deploymentProjectId, @NotNull BambooTestPermission permission)
Deprecated.prefer usingsetDeploymentProjectPermissions(java.lang.String, com.atlassian.bamboo.specs.api.builders.permission.Permissions)
which is backed by Specsvoid
revokeEnvironmentPermission(long environmentId, @NotNull BambooTestPermission permission)
Deprecated.prefer usingsetEnvironmentPermissions(java.lang.String, java.lang.String, com.atlassian.bamboo.specs.api.builders.permission.Permissions)
which is backed by Specsvoid
revokeLinkedRepositoryPermission(long repositoryId, @NotNull BambooTestPermission permission)
Revoke permission to a linked repository.void
revokePlanPermission(@NotNull PlanKey planKey, @NotNull BambooTestPermission permission)
Deprecated.void
revokeProjectPermission(@NotNull String projectKey, @NotNull BambooTestPermission permission)
Revoke project permissionvoid
setDeploymentProjectPermissions(@NotNull String deploymentProjectName, @NotNull com.atlassian.bamboo.specs.api.builders.permission.Permissions permissions)
Sets deployment project permissionsvoid
setEnvironmentPermissions(@NotNull String deploymentProjectName, @NotNull String environmentName, @NotNull com.atlassian.bamboo.specs.api.builders.permission.Permissions permissions)
Sets deployment environment permissionsvoid
setPlanPermissions(@NotNull PlanKey planKey, @NotNull com.atlassian.bamboo.specs.api.builders.permission.Permissions permissions)
Set complete plan permissionsvoid
setPlanPermissions(@NotNull com.atlassian.bamboo.specs.api.builders.permission.PlanPermissions permissions)
Set complete plan permissions-
Methods inherited from class com.atlassian.bamboo.testutils.backdoor.BackdoorControl
client, createResource, createResourceForPath, get, getEnvironmentData, getRestModulePath, percentEncode, ping, post, resourceRoot, tearDown
-
-
-
-
Constructor Detail
-
PermissionsControl
public PermissionsControl(@NotNull @NotNull BambooEnvironmentData environmentData)
-
-
Method Detail
-
grantProjectPermission
public void grantProjectPermission(@NotNull @NotNull String projectKey, @NotNull @NotNull BambooTestPermission permission)
Grant project permission- Parameters:
projectKey
- key of a Projectpermission
- permission to grant
-
revokeProjectPermission
public void revokeProjectPermission(@NotNull @NotNull String projectKey, @NotNull @NotNull BambooTestPermission permission)
Revoke project permission- Parameters:
projectKey
- key of a Projectpermission
- permission to revoke
-
grantProjectPlanPermission
public void grantProjectPlanPermission(@NotNull @NotNull String projectKey, @NotNull @NotNull BambooTestPermission permission)
Grant project plan permission- Parameters:
projectKey
- key of a Projectpermission
- permission to grant
-
grantPlanPermission
@Deprecated public void grantPlanPermission(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull BambooTestPermission permission)
Deprecated.Grant plan permission- Parameters:
planKey
- key of a Planpermission
- permission to grant
-
revokePlanPermission
@Deprecated public void revokePlanPermission(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull BambooTestPermission permission)
Deprecated.Revoke plan permission- Parameters:
planKey
- key of a Planpermission
- permission to revoke
-
setPlanPermissions
public void setPlanPermissions(@NotNull @NotNull com.atlassian.bamboo.specs.api.builders.permission.PlanPermissions permissions)
Set complete plan permissions- Parameters:
permissions
- new plan permission scheme
-
setPlanPermissions
public void setPlanPermissions(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull com.atlassian.bamboo.specs.api.builders.permission.Permissions permissions)
Set complete plan permissions- Parameters:
planKey
- key of a Planpermissions
- new plan permission scheme
-
hasPlanPermission
public boolean hasPlanPermission(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull BambooTestPermission permission)
-
checkPlanPermissions
public void checkPlanPermissions(PlanKey planKey, BambooRole role, List<BambooPermission> has, List<BambooPermission> hasNot)
-
hasDeploymentProjectPermission
public boolean hasDeploymentProjectPermission(long deploymentProjectId, @NotNull @NotNull BambooTestPermission permission)
-
grantLinkedRepositoryPermission
public void grantLinkedRepositoryPermission(long repositoryId, @NotNull @NotNull BambooTestPermission permission)
Grant permission to a linked repository.- Parameters:
repositoryId
- id of repositorypermission
- permission to grant
-
revokeLinkedRepositoryPermission
public void revokeLinkedRepositoryPermission(long repositoryId, @NotNull @NotNull BambooTestPermission permission)
Revoke permission to a linked repository.- Parameters:
repositoryId
- id of repositorypermission
- permission to revoke
-
hasLinkedRepositoryPermission
public boolean hasLinkedRepositoryPermission(long repositoryId, @NotNull @NotNull BambooTestPermission permission)
Check whether a permission is granted on a linked repository.- Parameters:
repositoryId
- id of repositorypermission
- permission to check
-
grantDeploymentProjectPermission
@Deprecated public void grantDeploymentProjectPermission(long deploymentProjectId, @NotNull @NotNull BambooTestPermission permission)
Deprecated.prefer usingsetDeploymentProjectPermissions(java.lang.String, com.atlassian.bamboo.specs.api.builders.permission.Permissions)
which is backed by SpecsGrant deployment project permission- Parameters:
deploymentProjectId
- id of deployment projectpermission
- permission to set
-
setDeploymentProjectPermissions
public void setDeploymentProjectPermissions(@NotNull @NotNull String deploymentProjectName, @NotNull @NotNull com.atlassian.bamboo.specs.api.builders.permission.Permissions permissions)
Sets deployment project permissions- Parameters:
deploymentProjectName
- deployment project namepermissions
- new permission set
-
revokeDeploymentProjectPermission
@Deprecated public void revokeDeploymentProjectPermission(long deploymentProjectId, @NotNull @NotNull BambooTestPermission permission)
Deprecated.prefer usingsetDeploymentProjectPermissions(java.lang.String, com.atlassian.bamboo.specs.api.builders.permission.Permissions)
which is backed by SpecsRevoke deployment project permission- Parameters:
deploymentProjectId
- id of deployment projectpermission
- permission to revoke
-
grantEnvironmentPermission
@Deprecated public void grantEnvironmentPermission(long environmentId, @NotNull @NotNull BambooTestPermission permission)
Deprecated.prefer usingsetEnvironmentPermissions(java.lang.String, java.lang.String, com.atlassian.bamboo.specs.api.builders.permission.Permissions)
which is backed by SpecsGrant deployment environment permission- Parameters:
environmentId
- id of deployment environmentpermission
- permission to set
-
setEnvironmentPermissions
public void setEnvironmentPermissions(@NotNull @NotNull String deploymentProjectName, @NotNull @NotNull String environmentName, @NotNull @NotNull com.atlassian.bamboo.specs.api.builders.permission.Permissions permissions)
Sets deployment environment permissions- Parameters:
deploymentProjectName
- deployment project nameenvironmentName
- environment namepermissions
- new permission set
-
revokeEnvironmentPermission
@Deprecated public void revokeEnvironmentPermission(long environmentId, @NotNull @NotNull BambooTestPermission permission)
Deprecated.prefer usingsetEnvironmentPermissions(java.lang.String, java.lang.String, com.atlassian.bamboo.specs.api.builders.permission.Permissions)
which is backed by SpecsRevoke deployment environment permission- Parameters:
environmentId
- id of deployment environmentpermission
- permission to revoke
-
-