Package com.atlassian.bamboo.project
Class DefaultProjectPlanPermissionsService
java.lang.Object
com.atlassian.bamboo.project.DefaultProjectPlanPermissionsService
- All Implemented Interfaces:
ProjectPlanPermissionsService
public class DefaultProjectPlanPermissionsService
extends Object
implements ProjectPlanPermissionsService
-
Constructor Summary
ConstructorDescriptionDefaultProjectPlanPermissionsService
(HibernateMutableAclService aclService, TransactionAndHibernateTemplate hibernateTemplate, BambooAclHelper aclHelper, ProjectManager projectManage, BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager) -
Method Summary
Modifier and TypeMethodDescriptionboolean
addAnonymousPermissionsToPlan
(@NotNull String projectKey) boolean
addGroupPermissionsToProjectPlan
(@NotNull String projectKey, @NotNull String group, @NotNull List<BambooPermission> permissionsToAdd) boolean
addLoggedInPermissionsToProjectPlan
(@NotNull String projectKey, @NotNull List<BambooPermission> permissionsToAdd) boolean
addUserPermissionsToProjectPlan
(@NotNull String projectKey, @NotNull String username, @NotNull List<BambooPermission> permissionsToAdd) @NotNull List<BambooPermission>
getAnonymousPermissionsForProjectPlan
(@NotNull String projectKey) @NotNull List<BambooPermission>
getGroupPermissionsForProjectPlan
(@NotNull String projectKey, @NotNull String group) @NotNull List<BambooPermission>
getLoggedInPermissionsForProjectPlan
(@NotNull String projectKey) @NotNull List<BambooPermission>
getUserPermissionsForProjectPlan
(@NotNull String projectKey, @NotNull String username) listGroupsWithPermissionsForProjectPlan
(@NotNull String projectKey) listUsersWithPermissionsForProjectPlan
(@NotNull String projectKey) @NotNull Collection<BambooPermission>
permissionDependencies
(@NotNull BambooPermission permission) Obtain a collection of Bamboo permissions dependent on the passedpermission
.boolean
removeAnonymousPermissionsFromPlan
(@NotNull String projectKey) boolean
removeGroupPermissionsFromProjectPlan
(@NotNull String projectKey, @NotNull String group, @NotNull List<BambooPermission> permissionsToRemove) boolean
removeLoggedInPermissionsFromProjectPlan
(@NotNull String projectKey, @NotNull List<BambooPermission> permissionsToRemove) boolean
removeUserPermissionsFromProjectPlan
(@NotNull String projectKey, @NotNull String username, @NotNull List<BambooPermission> permissionsToRemove) @NotNull Collection<BambooPermission>
Collection of permissions configurable on projects to apply to all contained plans.
-
Constructor Details
-
DefaultProjectPlanPermissionsService
@Autowired public DefaultProjectPlanPermissionsService(HibernateMutableAclService aclService, TransactionAndHibernateTemplate hibernateTemplate, BambooAclHelper aclHelper, ProjectManager projectManage, BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager)
-
-
Method Details
-
listUsersWithPermissionsForProjectPlan
@NotNull public @NotNull Iterable<String> listUsersWithPermissionsForProjectPlan(@NotNull @NotNull String projectKey) - Specified by:
listUsersWithPermissionsForProjectPlan
in interfaceProjectPlanPermissionsService
-
getUserPermissionsForProjectPlan
@NotNull public @NotNull List<BambooPermission> getUserPermissionsForProjectPlan(@NotNull @NotNull String projectKey, @NotNull @NotNull String username) - Specified by:
getUserPermissionsForProjectPlan
in interfaceProjectPlanPermissionsService
-
addUserPermissionsToProjectPlan
public boolean addUserPermissionsToProjectPlan(@NotNull @NotNull String projectKey, @NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToAdd) - Specified by:
addUserPermissionsToProjectPlan
in interfaceProjectPlanPermissionsService
-
removeUserPermissionsFromProjectPlan
public boolean removeUserPermissionsFromProjectPlan(@NotNull @NotNull String projectKey, @NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToRemove) - Specified by:
removeUserPermissionsFromProjectPlan
in interfaceProjectPlanPermissionsService
-
listGroupsWithPermissionsForProjectPlan
@NotNull public @NotNull Iterable<String> listGroupsWithPermissionsForProjectPlan(@NotNull @NotNull String projectKey) - Specified by:
listGroupsWithPermissionsForProjectPlan
in interfaceProjectPlanPermissionsService
-
getGroupPermissionsForProjectPlan
@NotNull public @NotNull List<BambooPermission> getGroupPermissionsForProjectPlan(@NotNull @NotNull String projectKey, @NotNull @NotNull String group) - Specified by:
getGroupPermissionsForProjectPlan
in interfaceProjectPlanPermissionsService
-
addGroupPermissionsToProjectPlan
public boolean addGroupPermissionsToProjectPlan(@NotNull @NotNull String projectKey, @NotNull @NotNull String group, @NotNull @NotNull List<BambooPermission> permissionsToAdd) - Specified by:
addGroupPermissionsToProjectPlan
in interfaceProjectPlanPermissionsService
-
removeGroupPermissionsFromProjectPlan
public boolean removeGroupPermissionsFromProjectPlan(@NotNull @NotNull String projectKey, @NotNull @NotNull String group, @NotNull @NotNull List<BambooPermission> permissionsToRemove) - Specified by:
removeGroupPermissionsFromProjectPlan
in interfaceProjectPlanPermissionsService
-
getLoggedInPermissionsForProjectPlan
@NotNull public @NotNull List<BambooPermission> getLoggedInPermissionsForProjectPlan(@NotNull @NotNull String projectKey) - Specified by:
getLoggedInPermissionsForProjectPlan
in interfaceProjectPlanPermissionsService
-
addLoggedInPermissionsToProjectPlan
public boolean addLoggedInPermissionsToProjectPlan(@NotNull @NotNull String projectKey, @NotNull @NotNull List<BambooPermission> permissionsToAdd) - Specified by:
addLoggedInPermissionsToProjectPlan
in interfaceProjectPlanPermissionsService
-
removeLoggedInPermissionsFromProjectPlan
public boolean removeLoggedInPermissionsFromProjectPlan(@NotNull @NotNull String projectKey, @NotNull @NotNull List<BambooPermission> permissionsToRemove) - Specified by:
removeLoggedInPermissionsFromProjectPlan
in interfaceProjectPlanPermissionsService
-
getAnonymousPermissionsForProjectPlan
@NotNull public @NotNull List<BambooPermission> getAnonymousPermissionsForProjectPlan(@NotNull @NotNull String projectKey) - Specified by:
getAnonymousPermissionsForProjectPlan
in interfaceProjectPlanPermissionsService
-
addAnonymousPermissionsToPlan
- Specified by:
addAnonymousPermissionsToPlan
in interfaceProjectPlanPermissionsService
-
removeAnonymousPermissionsFromPlan
- Specified by:
removeAnonymousPermissionsFromPlan
in interfaceProjectPlanPermissionsService
-
supportedPermissions
Description copied from interface:ProjectPlanPermissionsService
Collection of permissions configurable on projects to apply to all contained plans.Ordered by permission importance. Least granting permissions come first.
- Specified by:
supportedPermissions
in interfaceProjectPlanPermissionsService
-
permissionDependencies
@NotNull public @NotNull Collection<BambooPermission> permissionDependencies(@NotNull @NotNull BambooPermission permission) Description copied from interface:ProjectPlanPermissionsService
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.
- Specified by:
permissionDependencies
in interfaceProjectPlanPermissionsService
-