Package com.atlassian.bamboo.project
Interface ProjectPermissionsService
- All Known Implementing Classes:
DefaultProjectPermissionsService
@Experimental
public interface ProjectPermissionsService
Service for managing project permissions.
- Since:
- 6.2
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addAnonymousPermission
(@NotNull String projectKey) Grants READ permission for anonymous user to project.boolean
addGroupPermissionsToProject
(@NotNull String projectKey, @NotNull String group, @NotNull List<BambooPermission> permissionsToAdd) boolean
addLoggedInPermissionsToProject
(@NotNull String projectKey, @NotNull List<BambooPermission> permissionsToAdd) boolean
addUserPermissionsToProject
(@NotNull String projectKey, @NotNull String username, @NotNull List<BambooPermission> permissionsToAdd) getAnonymousPermissions
(@NotNull String projectKey) @NotNull List<BambooPermission>
getGroupPermissionsForProject
(@NotNull String projectKey, @NotNull String group) @NotNull List<BambooPermission>
getLoggedInPermissionsForProject
(@NotNull String projectKey) @NotNull List<BambooPermission>
getUserPermissionsForProject
(@NotNull String projectKey, @NotNull String username) listGroupsWithPermissionsForProject
(@NotNull String projectKey) listUsersWithPermissionsForProject
(@NotNull String projectKey) @NotNull Collection<BambooPermission>
permissionDependencies
(@NotNull BambooPermission permission) Obtain a collection of Bamboo permissions dependent on the passedpermission
.boolean
removeAnonymousPermission
(@NotNull String projectKey) Revoke READ permission from project for anonymous user.boolean
removeGroupPermissionsFromProject
(@NotNull String projectKey, @NotNull String group, @NotNull List<BambooPermission> permissionsToRemove) boolean
removeLoggedInPermissionsFromProject
(@NotNull String projectKey, @NotNull List<BambooPermission> permissionsToRemove) boolean
removeUserPermissionsFromProject
(@NotNull String projectKey, @NotNull String username, @NotNull List<BambooPermission> permissionsToRemove) @NotNull Collection<BambooPermission>
Collection of permissions configurable for projects.
-
Method Details
-
listUsersWithPermissionsForProject
-
getUserPermissionsForProject
@NotNull @NotNull List<BambooPermission> getUserPermissionsForProject(@NotNull @NotNull String projectKey, @NotNull @NotNull String username) -
addUserPermissionsToProject
boolean addUserPermissionsToProject(@NotNull @NotNull String projectKey, @NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToAdd) -
removeUserPermissionsFromProject
boolean removeUserPermissionsFromProject(@NotNull @NotNull String projectKey, @NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToRemove) -
listGroupsWithPermissionsForProject
-
getGroupPermissionsForProject
@NotNull @NotNull List<BambooPermission> getGroupPermissionsForProject(@NotNull @NotNull String projectKey, @NotNull @NotNull String group) -
addGroupPermissionsToProject
boolean addGroupPermissionsToProject(@NotNull @NotNull String projectKey, @NotNull @NotNull String group, @NotNull @NotNull List<BambooPermission> permissionsToAdd) -
removeGroupPermissionsFromProject
boolean removeGroupPermissionsFromProject(@NotNull @NotNull String projectKey, @NotNull @NotNull String group, @NotNull @NotNull List<BambooPermission> permissionsToRemove) -
getLoggedInPermissionsForProject
@NotNull @NotNull List<BambooPermission> getLoggedInPermissionsForProject(@NotNull @NotNull String projectKey) -
addLoggedInPermissionsToProject
boolean addLoggedInPermissionsToProject(@NotNull @NotNull String projectKey, @NotNull @NotNull List<BambooPermission> permissionsToAdd) -
removeLoggedInPermissionsFromProject
boolean removeLoggedInPermissionsFromProject(@NotNull @NotNull String projectKey, @NotNull @NotNull List<BambooPermission> permissionsToRemove) -
supportedPermissions
Collection of permissions configurable for projects.Ordered by permission importance. Least granting permissions come first.
-
permissionDependencies
@NotNull @NotNull Collection<BambooPermission> permissionDependencies(@NotNull @NotNull BambooPermission permission) 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.
-
getAnonymousPermissions
- Returns:
- permissions of anonymous user for project
-
addAnonymousPermission
Grants READ permission for anonymous user to project.- Returns:
- true if permission was granted
-
removeAnonymousPermission
Revoke READ permission from project for anonymous user.- Returns:
- true if permission was revoked.
-