public class DefaultEnvironmentPermissionsService extends Object implements EnvironmentPermissionsService
Constructor and Description |
---|
DefaultEnvironmentPermissionsService(TransactionAndHibernateTemplate hibernateTemplate,
HibernateMutableAclService aclService,
BambooAclHelper aclHelper,
EnvironmentService environmentService,
BambooPermissionManager bambooPermissionManager,
BambooUserManager bambooUserManager) |
Modifier and Type | Method and Description |
---|---|
boolean |
addAnonymousPermissionsToEnvironment(long environmentId) |
boolean |
addGroupPermissionsToEnvironment(long environmentId,
@NotNull String groupName,
@NotNull List<BambooPermission> permissionsToAdd) |
boolean |
addLoggedInPermissionsToEnvironment(long environmentId,
@NotNull List<BambooPermission> permissionsToAdd) |
boolean |
addUserPermissionsToEnvironment(long environmentId,
@NotNull String username,
@NotNull List<BambooPermission> permissionsToAdd) |
@NotNull List<BambooPermission> |
getAnonymousPermissionsForEnvironment(long environmentId) |
@NotNull List<BambooPermission> |
getGroupPermissionsForEnvironment(long environmentId,
@NotNull String groupName) |
@NotNull List<BambooPermission> |
getLoggedInPermissionsForEnvironment(long environmentId) |
@NotNull List<BambooPermission> |
getUserPermissionsForEnvironment(long environmentId,
@NotNull String username) |
@NotNull Iterable<String> |
listGroupsWithPermissionsForEnvironment(long environmentId) |
@NotNull Iterable<String> |
listUsersWithPermissionsForEnvironment(long environmentId) |
@NotNull Collection<BambooPermission> |
permissionDependencies(@NotNull BambooPermission permission)
Obtain a collection of Bamboo permissions dependent on the passed
permission . |
boolean |
removeAnonymousPermissionsFromEnvironment(long environmentId) |
boolean |
removeGroupPermissionsFromEnvironment(long environmentId,
@NotNull String groupName,
@NotNull List<BambooPermission> permissionsToRemove) |
boolean |
removeLoggedInPermissionsFromEnvironment(long environmentId,
@NotNull List<BambooPermission> permissionsToRemove) |
boolean |
removeUserPermissionsFromEnvironment(long environmentId,
@NotNull String username,
@NotNull List<BambooPermission> permissionsToRemove) |
@NotNull Collection<BambooPermission> |
supportedPermissions()
Collection of permissions configurable for environments.
|
@Inject public DefaultEnvironmentPermissionsService(TransactionAndHibernateTemplate hibernateTemplate, HibernateMutableAclService aclService, BambooAclHelper aclHelper, EnvironmentService environmentService, BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager)
@NotNull public @NotNull Iterable<String> listUsersWithPermissionsForEnvironment(long environmentId)
listUsersWithPermissionsForEnvironment
in interface EnvironmentPermissionsService
@NotNull public @NotNull List<BambooPermission> getUserPermissionsForEnvironment(long environmentId, @NotNull @NotNull String username)
getUserPermissionsForEnvironment
in interface EnvironmentPermissionsService
public boolean addUserPermissionsToEnvironment(long environmentId, @NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToAdd)
addUserPermissionsToEnvironment
in interface EnvironmentPermissionsService
public boolean removeUserPermissionsFromEnvironment(long environmentId, @NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToRemove)
removeUserPermissionsFromEnvironment
in interface EnvironmentPermissionsService
@NotNull public @NotNull Iterable<String> listGroupsWithPermissionsForEnvironment(long environmentId)
listGroupsWithPermissionsForEnvironment
in interface EnvironmentPermissionsService
@NotNull public @NotNull List<BambooPermission> getGroupPermissionsForEnvironment(long environmentId, @NotNull @NotNull String groupName)
getGroupPermissionsForEnvironment
in interface EnvironmentPermissionsService
public boolean addGroupPermissionsToEnvironment(long environmentId, @NotNull @NotNull String groupName, @NotNull @NotNull List<BambooPermission> permissionsToAdd)
addGroupPermissionsToEnvironment
in interface EnvironmentPermissionsService
public boolean removeGroupPermissionsFromEnvironment(long environmentId, @NotNull @NotNull String groupName, @NotNull @NotNull List<BambooPermission> permissionsToRemove)
removeGroupPermissionsFromEnvironment
in interface EnvironmentPermissionsService
@NotNull public @NotNull List<BambooPermission> getLoggedInPermissionsForEnvironment(long environmentId)
getLoggedInPermissionsForEnvironment
in interface EnvironmentPermissionsService
public boolean addLoggedInPermissionsToEnvironment(long environmentId, @NotNull @NotNull List<BambooPermission> permissionsToAdd)
addLoggedInPermissionsToEnvironment
in interface EnvironmentPermissionsService
public boolean removeLoggedInPermissionsFromEnvironment(long environmentId, @NotNull @NotNull List<BambooPermission> permissionsToRemove)
removeLoggedInPermissionsFromEnvironment
in interface EnvironmentPermissionsService
@NotNull public @NotNull List<BambooPermission> getAnonymousPermissionsForEnvironment(long environmentId)
getAnonymousPermissionsForEnvironment
in interface EnvironmentPermissionsService
public boolean addAnonymousPermissionsToEnvironment(long environmentId)
addAnonymousPermissionsToEnvironment
in interface EnvironmentPermissionsService
public boolean removeAnonymousPermissionsFromEnvironment(long environmentId)
removeAnonymousPermissionsFromEnvironment
in interface EnvironmentPermissionsService
@NotNull public @NotNull Collection<BambooPermission> supportedPermissions()
EnvironmentPermissionsService
Ordered by permission importance. Least granting permissions come first.
supportedPermissions
in interface EnvironmentPermissionsService
@NotNull public @NotNull Collection<BambooPermission> permissionDependencies(@NotNull @NotNull BambooPermission permission)
EnvironmentPermissionsService
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 EnvironmentPermissionsService
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.