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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
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)
List<BambooPermission>
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)
@NotNull Iterable<String>
listGroupsWithPermissionsForProject(@NotNull String projectKey)
@NotNull Iterable<String>
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>
supportedPermissions()
Collection of permissions configurable for projects.
-
-
-
Method Detail
-
listUsersWithPermissionsForProject
@NotNull @NotNull Iterable<String> listUsersWithPermissionsForProject(@NotNull @NotNull String projectKey)
-
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
@NotNull @NotNull Iterable<String> listGroupsWithPermissionsForProject(@NotNull @NotNull String projectKey)
-
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
@NotNull @NotNull Collection<BambooPermission> 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
List<BambooPermission> getAnonymousPermissions(@NotNull @NotNull String projectKey)
- Returns:
- permissions of anonymous user for project
-
addAnonymousPermission
boolean addAnonymousPermission(@NotNull @NotNull String projectKey)
Grants READ permission for anonymous user to project.- Returns:
- true if permission was granted
-
removeAnonymousPermission
boolean removeAnonymousPermission(@NotNull @NotNull String projectKey)
Revoke READ permission from project for anonymous user.- Returns:
- true if permission was revoked.
-
-