public class DefaultProjectPermissionsService extends Object implements ProjectPermissionsService
Constructor and Description |
---|
DefaultProjectPermissionsService(HibernateMutableAclService aclService,
TransactionAndHibernateTemplate hibernateTemplate,
BambooAclHelper aclHelper,
ProjectManager projectManager,
BambooPermissionManager bambooPermissionManager,
BambooUserManager bambooUserManager,
FeatureManager featureManager) |
Modifier and Type | Method and 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 passed
permission . |
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.
|
@Autowired public DefaultProjectPermissionsService(HibernateMutableAclService aclService, TransactionAndHibernateTemplate hibernateTemplate, BambooAclHelper aclHelper, ProjectManager projectManager, BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager, FeatureManager featureManager)
@NotNull public @NotNull Iterable<String> listUsersWithPermissionsForProject(@NotNull @NotNull String projectKey)
listUsersWithPermissionsForProject
in interface ProjectPermissionsService
@NotNull public @NotNull List<BambooPermission> getUserPermissionsForProject(@NotNull @NotNull String projectKey, @NotNull @NotNull String username)
getUserPermissionsForProject
in interface ProjectPermissionsService
public boolean addUserPermissionsToProject(@NotNull @NotNull String projectKey, @NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToAdd)
addUserPermissionsToProject
in interface ProjectPermissionsService
public boolean removeUserPermissionsFromProject(@NotNull @NotNull String projectKey, @NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToRemove)
removeUserPermissionsFromProject
in interface ProjectPermissionsService
@NotNull public @NotNull Iterable<String> listGroupsWithPermissionsForProject(@NotNull @NotNull String projectKey)
listGroupsWithPermissionsForProject
in interface ProjectPermissionsService
@NotNull public @NotNull List<BambooPermission> getGroupPermissionsForProject(@NotNull @NotNull String projectKey, @NotNull @NotNull String group)
getGroupPermissionsForProject
in interface ProjectPermissionsService
public boolean addGroupPermissionsToProject(@NotNull @NotNull String projectKey, @NotNull @NotNull String group, @NotNull @NotNull List<BambooPermission> permissionsToAdd)
addGroupPermissionsToProject
in interface ProjectPermissionsService
public boolean removeGroupPermissionsFromProject(@NotNull @NotNull String projectKey, @NotNull @NotNull String group, @NotNull @NotNull List<BambooPermission> permissionsToRemove)
removeGroupPermissionsFromProject
in interface ProjectPermissionsService
@NotNull public @NotNull List<BambooPermission> getLoggedInPermissionsForProject(@NotNull @NotNull String projectKey)
getLoggedInPermissionsForProject
in interface ProjectPermissionsService
public boolean addLoggedInPermissionsToProject(@NotNull @NotNull String projectKey, @NotNull @NotNull List<BambooPermission> permissionsToAdd)
addLoggedInPermissionsToProject
in interface ProjectPermissionsService
public boolean removeLoggedInPermissionsFromProject(@NotNull @NotNull String projectKey, @NotNull @NotNull List<BambooPermission> permissionsToRemove)
removeLoggedInPermissionsFromProject
in interface ProjectPermissionsService
@NotNull public @NotNull Collection<BambooPermission> supportedPermissions()
ProjectPermissionsService
Ordered by permission importance. Least granting permissions come first.
supportedPermissions
in interface ProjectPermissionsService
@NotNull public @NotNull Collection<BambooPermission> permissionDependencies(@NotNull @NotNull BambooPermission permission)
ProjectPermissionsService
permission
. 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.
permissionDependencies
in interface ProjectPermissionsService
public List<BambooPermission> getAnonymousPermissions(@NotNull @NotNull String projectKey)
getAnonymousPermissions
in interface ProjectPermissionsService
public boolean addAnonymousPermission(@NotNull @NotNull String projectKey)
ProjectPermissionsService
addAnonymousPermission
in interface ProjectPermissionsService
public boolean removeAnonymousPermission(@NotNull @NotNull String projectKey)
ProjectPermissionsService
removeAnonymousPermission
in interface ProjectPermissionsService
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.