Class DefaultDeploymentProjectPermissionsService
- java.lang.Object
-
- com.atlassian.bamboo.deployments.projects.DefaultDeploymentProjectPermissionsService
-
- All Implemented Interfaces:
DeploymentProjectPermissionsService
public class DefaultDeploymentProjectPermissionsService extends Object implements DeploymentProjectPermissionsService
-
-
Constructor Summary
Constructors Constructor Description DefaultDeploymentProjectPermissionsService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addAnonymousPermissionsToDeploymentProject(long deploymentProjectId)
boolean
addGroupPermissionsToDeploymentProject(long deploymentProjectId, @NotNull String groupName, @NotNull List<BambooPermission> permissionsToAdd)
boolean
addLoggedInPermissionsToDeploymentProject(long deploymentProjectId, @NotNull List<BambooPermission> permissionsToAdd)
boolean
addUserPermissionsToDeploymentProject(long deploymentProjectId, @NotNull String username, @NotNull List<BambooPermission> permissionsToAdd)
boolean
canUserApproveReleases(long deploymentProjectId, @NotNull String username)
@NotNull List<BambooPermission>
getAnonymousPermissionsForDeploymentProject(long deploymentProjectId)
@NotNull List<BambooPermission>
getGroupPermissionsForDeploymentProject(long deploymentProjectId, @NotNull String groupName)
@NotNull List<BambooPermission>
getLoggedInPermissionsForDeploymentProject(long deploymentProjectId)
@NotNull List<BambooPermission>
getUserPermissionsForDeploymentProject(long deploymentProjectId, @NotNull String username)
@NotNull Iterable<String>
listGroupsWithPermissionsForDeploymentProject(long deploymentProjectId)
@NotNull Iterable<String>
listUsersWithPermissionsForDeploymentProject(long deploymentProjectId)
@NotNull Collection<BambooPermission>
permissionDependencies(@NotNull BambooPermission permission)
Obtain a collection of Bamboo permissions dependent on the passedpermission
.boolean
removeAnonymousPermissionsFromDeploymentProject(long deploymentProjectId)
boolean
removeGroupPermissionsFromDeploymentProject(long deploymentProjectId, @NotNull String groupName, @NotNull List<BambooPermission> permissionsToRemove)
boolean
removeLoggedInPermissionsFromDeploymentProject(long deploymentProjectId, @NotNull List<BambooPermission> permissionsToRemove)
boolean
removeUserPermissionsFromDeploymentProject(long deploymentProjectId, @NotNull String username, @NotNull List<BambooPermission> permissionsToRemove)
@NotNull Collection<BambooPermission>
supportedPermissions()
Collection of permissions configurable for deployment projects.
-
-
-
Method Detail
-
listUsersWithPermissionsForDeploymentProject
@NotNull public @NotNull Iterable<String> listUsersWithPermissionsForDeploymentProject(long deploymentProjectId)
- Specified by:
listUsersWithPermissionsForDeploymentProject
in interfaceDeploymentProjectPermissionsService
-
getUserPermissionsForDeploymentProject
@NotNull public @NotNull List<BambooPermission> getUserPermissionsForDeploymentProject(long deploymentProjectId, @NotNull @NotNull String username)
- Specified by:
getUserPermissionsForDeploymentProject
in interfaceDeploymentProjectPermissionsService
-
canUserApproveReleases
public boolean canUserApproveReleases(long deploymentProjectId, @NotNull @NotNull String username)
- Specified by:
canUserApproveReleases
in interfaceDeploymentProjectPermissionsService
-
addUserPermissionsToDeploymentProject
public boolean addUserPermissionsToDeploymentProject(long deploymentProjectId, @NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToAdd)
- Specified by:
addUserPermissionsToDeploymentProject
in interfaceDeploymentProjectPermissionsService
-
removeUserPermissionsFromDeploymentProject
public boolean removeUserPermissionsFromDeploymentProject(long deploymentProjectId, @NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToRemove)
- Specified by:
removeUserPermissionsFromDeploymentProject
in interfaceDeploymentProjectPermissionsService
-
listGroupsWithPermissionsForDeploymentProject
@NotNull public @NotNull Iterable<String> listGroupsWithPermissionsForDeploymentProject(long deploymentProjectId)
- Specified by:
listGroupsWithPermissionsForDeploymentProject
in interfaceDeploymentProjectPermissionsService
-
getGroupPermissionsForDeploymentProject
@NotNull public @NotNull List<BambooPermission> getGroupPermissionsForDeploymentProject(long deploymentProjectId, @NotNull @NotNull String groupName)
- Specified by:
getGroupPermissionsForDeploymentProject
in interfaceDeploymentProjectPermissionsService
-
addGroupPermissionsToDeploymentProject
public boolean addGroupPermissionsToDeploymentProject(long deploymentProjectId, @NotNull @NotNull String groupName, @NotNull @NotNull List<BambooPermission> permissionsToAdd)
- Specified by:
addGroupPermissionsToDeploymentProject
in interfaceDeploymentProjectPermissionsService
-
removeGroupPermissionsFromDeploymentProject
public boolean removeGroupPermissionsFromDeploymentProject(long deploymentProjectId, @NotNull @NotNull String groupName, @NotNull @NotNull List<BambooPermission> permissionsToRemove)
- Specified by:
removeGroupPermissionsFromDeploymentProject
in interfaceDeploymentProjectPermissionsService
-
getLoggedInPermissionsForDeploymentProject
@NotNull public @NotNull List<BambooPermission> getLoggedInPermissionsForDeploymentProject(long deploymentProjectId)
- Specified by:
getLoggedInPermissionsForDeploymentProject
in interfaceDeploymentProjectPermissionsService
-
addLoggedInPermissionsToDeploymentProject
public boolean addLoggedInPermissionsToDeploymentProject(long deploymentProjectId, @NotNull @NotNull List<BambooPermission> permissionsToAdd)
- Specified by:
addLoggedInPermissionsToDeploymentProject
in interfaceDeploymentProjectPermissionsService
-
removeLoggedInPermissionsFromDeploymentProject
public boolean removeLoggedInPermissionsFromDeploymentProject(long deploymentProjectId, @NotNull @NotNull List<BambooPermission> permissionsToRemove)
- Specified by:
removeLoggedInPermissionsFromDeploymentProject
in interfaceDeploymentProjectPermissionsService
-
getAnonymousPermissionsForDeploymentProject
@NotNull public @NotNull List<BambooPermission> getAnonymousPermissionsForDeploymentProject(long deploymentProjectId)
- Specified by:
getAnonymousPermissionsForDeploymentProject
in interfaceDeploymentProjectPermissionsService
-
addAnonymousPermissionsToDeploymentProject
public boolean addAnonymousPermissionsToDeploymentProject(long deploymentProjectId)
- Specified by:
addAnonymousPermissionsToDeploymentProject
in interfaceDeploymentProjectPermissionsService
-
removeAnonymousPermissionsFromDeploymentProject
public boolean removeAnonymousPermissionsFromDeploymentProject(long deploymentProjectId)
- Specified by:
removeAnonymousPermissionsFromDeploymentProject
in interfaceDeploymentProjectPermissionsService
-
supportedPermissions
@NotNull public @NotNull Collection<BambooPermission> supportedPermissions()
Description copied from interface:DeploymentProjectPermissionsService
Collection of permissions configurable for deployment projects.Ordered by permission importance. Least granting permissions come first.
- Specified by:
supportedPermissions
in interfaceDeploymentProjectPermissionsService
-
permissionDependencies
@NotNull public @NotNull Collection<BambooPermission> permissionDependencies(@NotNull @NotNull BambooPermission permission)
Description copied from interface:DeploymentProjectPermissionsService
Obtain a collection of Bamboo permissions dependent on the passedpermission
. A dependent permission is expected to always be granted whenever the parent permission is granted too.The result is an effective collection of dependencies, meaning there's no need to recursively traverse the dependency graph.
- Specified by:
permissionDependencies
in interfaceDeploymentProjectPermissionsService
-
-