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 booleanaddAnonymousPermissionsToDeploymentProject(long deploymentProjectId)booleanaddGroupPermissionsToDeploymentProject(long deploymentProjectId, @NotNull String groupName, @NotNull List<BambooPermission> permissionsToAdd)booleanaddLoggedInPermissionsToDeploymentProject(long deploymentProjectId, @NotNull List<BambooPermission> permissionsToAdd)booleanaddUserPermissionsToDeploymentProject(long deploymentProjectId, @NotNull String username, @NotNull List<BambooPermission> permissionsToAdd)booleancanUserApproveReleases(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.booleanremoveAnonymousPermissionsFromDeploymentProject(long deploymentProjectId)booleanremoveGroupPermissionsFromDeploymentProject(long deploymentProjectId, @NotNull String groupName, @NotNull List<BambooPermission> permissionsToRemove)booleanremoveLoggedInPermissionsFromDeploymentProject(long deploymentProjectId, @NotNull List<BambooPermission> permissionsToRemove)booleanremoveUserPermissionsFromDeploymentProject(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:
listUsersWithPermissionsForDeploymentProjectin interfaceDeploymentProjectPermissionsService
-
getUserPermissionsForDeploymentProject
@NotNull public @NotNull List<BambooPermission> getUserPermissionsForDeploymentProject(long deploymentProjectId, @NotNull @NotNull String username)
- Specified by:
getUserPermissionsForDeploymentProjectin interfaceDeploymentProjectPermissionsService
-
canUserApproveReleases
public boolean canUserApproveReleases(long deploymentProjectId, @NotNull @NotNull String username)- Specified by:
canUserApproveReleasesin interfaceDeploymentProjectPermissionsService
-
addUserPermissionsToDeploymentProject
public boolean addUserPermissionsToDeploymentProject(long deploymentProjectId, @NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToAdd)- Specified by:
addUserPermissionsToDeploymentProjectin interfaceDeploymentProjectPermissionsService
-
removeUserPermissionsFromDeploymentProject
public boolean removeUserPermissionsFromDeploymentProject(long deploymentProjectId, @NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToRemove)- Specified by:
removeUserPermissionsFromDeploymentProjectin interfaceDeploymentProjectPermissionsService
-
listGroupsWithPermissionsForDeploymentProject
@NotNull public @NotNull Iterable<String> listGroupsWithPermissionsForDeploymentProject(long deploymentProjectId)
- Specified by:
listGroupsWithPermissionsForDeploymentProjectin interfaceDeploymentProjectPermissionsService
-
getGroupPermissionsForDeploymentProject
@NotNull public @NotNull List<BambooPermission> getGroupPermissionsForDeploymentProject(long deploymentProjectId, @NotNull @NotNull String groupName)
- Specified by:
getGroupPermissionsForDeploymentProjectin interfaceDeploymentProjectPermissionsService
-
addGroupPermissionsToDeploymentProject
public boolean addGroupPermissionsToDeploymentProject(long deploymentProjectId, @NotNull @NotNull String groupName, @NotNull @NotNull List<BambooPermission> permissionsToAdd)- Specified by:
addGroupPermissionsToDeploymentProjectin interfaceDeploymentProjectPermissionsService
-
removeGroupPermissionsFromDeploymentProject
public boolean removeGroupPermissionsFromDeploymentProject(long deploymentProjectId, @NotNull @NotNull String groupName, @NotNull @NotNull List<BambooPermission> permissionsToRemove)- Specified by:
removeGroupPermissionsFromDeploymentProjectin interfaceDeploymentProjectPermissionsService
-
getLoggedInPermissionsForDeploymentProject
@NotNull public @NotNull List<BambooPermission> getLoggedInPermissionsForDeploymentProject(long deploymentProjectId)
- Specified by:
getLoggedInPermissionsForDeploymentProjectin interfaceDeploymentProjectPermissionsService
-
addLoggedInPermissionsToDeploymentProject
public boolean addLoggedInPermissionsToDeploymentProject(long deploymentProjectId, @NotNull @NotNull List<BambooPermission> permissionsToAdd)- Specified by:
addLoggedInPermissionsToDeploymentProjectin interfaceDeploymentProjectPermissionsService
-
removeLoggedInPermissionsFromDeploymentProject
public boolean removeLoggedInPermissionsFromDeploymentProject(long deploymentProjectId, @NotNull @NotNull List<BambooPermission> permissionsToRemove)- Specified by:
removeLoggedInPermissionsFromDeploymentProjectin interfaceDeploymentProjectPermissionsService
-
getAnonymousPermissionsForDeploymentProject
@NotNull public @NotNull List<BambooPermission> getAnonymousPermissionsForDeploymentProject(long deploymentProjectId)
- Specified by:
getAnonymousPermissionsForDeploymentProjectin interfaceDeploymentProjectPermissionsService
-
addAnonymousPermissionsToDeploymentProject
public boolean addAnonymousPermissionsToDeploymentProject(long deploymentProjectId)
- Specified by:
addAnonymousPermissionsToDeploymentProjectin interfaceDeploymentProjectPermissionsService
-
removeAnonymousPermissionsFromDeploymentProject
public boolean removeAnonymousPermissionsFromDeploymentProject(long deploymentProjectId)
- Specified by:
removeAnonymousPermissionsFromDeploymentProjectin interfaceDeploymentProjectPermissionsService
-
supportedPermissions
@NotNull public @NotNull Collection<BambooPermission> supportedPermissions()
Description copied from interface:DeploymentProjectPermissionsServiceCollection of permissions configurable for deployment projects.Ordered by permission importance. Least granting permissions come first.
- Specified by:
supportedPermissionsin interfaceDeploymentProjectPermissionsService
-
permissionDependencies
@NotNull public @NotNull Collection<BambooPermission> permissionDependencies(@NotNull @NotNull BambooPermission permission)
Description copied from interface:DeploymentProjectPermissionsServiceObtain 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:
permissionDependenciesin interfaceDeploymentProjectPermissionsService
-
-