Class PermissionsControl

java.lang.Object
com.atlassian.bamboo.testutils.backdoor.BackdoorControl<PermissionsControl>
com.atlassian.bamboo.testutils.backdoor.PermissionsControl

public class PermissionsControl extends BackdoorControl<PermissionsControl>
  • Constructor Details

    • PermissionsControl

      public PermissionsControl(@NotNull @NotNull BambooEnvironmentData environmentData)
  • Method Details

    • grantProjectPermission

      public void grantProjectPermission(@NotNull @NotNull String projectKey, @NotNull @NotNull BambooTestPermission permission)
      Grant project permission
      Parameters:
      projectKey - key of a Project
      permission - permission to grant
    • revokeProjectPermission

      public void revokeProjectPermission(@NotNull @NotNull String projectKey, @NotNull @NotNull BambooTestPermission permission)
      Revoke project permission
      Parameters:
      projectKey - key of a Project
      permission - permission to revoke
    • grantProjectPlanPermission

      public void grantProjectPlanPermission(@NotNull @NotNull String projectKey, @NotNull @NotNull BambooTestPermission permission)
      Grant project plan permission
      Parameters:
      projectKey - key of a Project
      permission - permission to grant
    • grantPlanPermission

      @Deprecated public void grantPlanPermission(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull BambooTestPermission permission)
      Grant plan permission
      Parameters:
      planKey - key of a Plan
      permission - permission to grant
    • revokePlanPermission

      @Deprecated public void revokePlanPermission(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull BambooTestPermission permission)
      Revoke plan permission
      Parameters:
      planKey - key of a Plan
      permission - 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 Plan
      permissions - 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 repository
      permission - permission to grant
    • revokeLinkedRepositoryPermission

      public void revokeLinkedRepositoryPermission(long repositoryId, @NotNull @NotNull BambooTestPermission permission)
      Revoke permission to a linked repository.
      Parameters:
      repositoryId - id of repository
      permission - 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 repository
      permission - permission to check
    • grantDeploymentProjectPermission

      @Deprecated public void grantDeploymentProjectPermission(long deploymentProjectId, @NotNull @NotNull BambooTestPermission permission)
      Grant deployment project permission
      Parameters:
      deploymentProjectId - id of deployment project
      permission - 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 name
      permissions - new permission set
    • revokeDeploymentProjectPermission

      @Deprecated public void revokeDeploymentProjectPermission(long deploymentProjectId, @NotNull @NotNull BambooTestPermission permission)
      Revoke deployment project permission
      Parameters:
      deploymentProjectId - id of deployment project
      permission - permission to revoke
    • grantEnvironmentPermission

      @Deprecated public void grantEnvironmentPermission(long environmentId, @NotNull @NotNull BambooTestPermission permission)
      Grant deployment environment permission
      Parameters:
      environmentId - id of deployment environment
      permission - 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 name
      environmentName - environment name
      permissions - new permission set
    • revokeEnvironmentPermission

      @Deprecated public void revokeEnvironmentPermission(long environmentId, @NotNull @NotNull BambooTestPermission permission)
      Revoke deployment environment permission
      Parameters:
      environmentId - id of deployment environment
      permission - permission to revoke