Package com.atlassian.bamboo.plan
Class DefaultPlanPermissionsService
- java.lang.Object
-
- com.atlassian.bamboo.plan.DefaultPlanPermissionsService
-
- All Implemented Interfaces:
PlanPermissionsService
public class DefaultPlanPermissionsService extends Object implements PlanPermissionsService
-
-
Constructor Summary
Constructors Constructor Description DefaultPlanPermissionsService(TransactionAndHibernateTemplate hibernateTemplate, HibernateMutableAclService aclService, BambooAclHelper aclHelper, PlanManager planManager, BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addAnonymousPermissionsToPlan(@NotNull String planKey)
boolean
addGroupPermissionsToPlan(@NotNull String planKey, @NotNull String groupName, @NotNull List<BambooPermission> permissionsToAdd)
boolean
addLoggedInPermissionsToPlan(@NotNull String planKey, @NotNull List<BambooPermission> permissionsToAdd)
boolean
addUserPermissionsToPlan(@NotNull String planKey, @NotNull String username, @NotNull List<BambooPermission> permissionsToAdd)
@NotNull List<BambooPermission>
getAnonymousPermissionsForPlan(@NotNull String planKey)
@NotNull List<BambooPermission>
getGroupPermissionsForPlan(@NotNull String planKey, @NotNull String groupName)
@NotNull List<BambooPermission>
getLoggedInPermissionsForPlan(@NotNull String planKey)
@NotNull List<BambooPermission>
getUserPermissionsForPlan(@NotNull String planKey, @NotNull String username)
@NotNull Iterable<String>
listGroupsWithPermissionsForPlan(@NotNull String planKey)
@NotNull Iterable<String>
listUsersWithPermissionsForPlan(@NotNull String planKey)
@NotNull Collection<BambooPermission>
permissionDependencies(@NotNull BambooPermission permission)
Obtain a collection of Bamboo permissions dependent on the passedpermission
.boolean
removeAnonymousPermissionsFromPlan(@NotNull String planKey)
boolean
removeGroupPermissionsFromPlan(@NotNull String planKey, @NotNull String groupName, @NotNull List<BambooPermission> permissionsToRemove)
boolean
removeLoggedInPermissionsFromPlan(@NotNull String planKey, @NotNull List<BambooPermission> permissionsToRemove)
boolean
removeUserPermissionsFromPlan(@NotNull String planKey, @NotNull String username, @NotNull List<BambooPermission> permissionsToRemove)
@NotNull Collection<BambooPermission>
supportedPermissions()
Collection of permissions configurable for plans.
-
-
-
Constructor Detail
-
DefaultPlanPermissionsService
@Autowired public DefaultPlanPermissionsService(TransactionAndHibernateTemplate hibernateTemplate, HibernateMutableAclService aclService, BambooAclHelper aclHelper, PlanManager planManager, BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager)
-
-
Method Detail
-
listUsersWithPermissionsForPlan
@NotNull public @NotNull Iterable<String> listUsersWithPermissionsForPlan(@NotNull @NotNull String planKey)
- Specified by:
listUsersWithPermissionsForPlan
in interfacePlanPermissionsService
-
getUserPermissionsForPlan
@NotNull public @NotNull List<BambooPermission> getUserPermissionsForPlan(@NotNull @NotNull String planKey, @NotNull @NotNull String username)
- Specified by:
getUserPermissionsForPlan
in interfacePlanPermissionsService
-
addUserPermissionsToPlan
public boolean addUserPermissionsToPlan(@NotNull @NotNull String planKey, @NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToAdd)
- Specified by:
addUserPermissionsToPlan
in interfacePlanPermissionsService
-
removeUserPermissionsFromPlan
public boolean removeUserPermissionsFromPlan(@NotNull @NotNull String planKey, @NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToRemove)
- Specified by:
removeUserPermissionsFromPlan
in interfacePlanPermissionsService
-
listGroupsWithPermissionsForPlan
@NotNull public @NotNull Iterable<String> listGroupsWithPermissionsForPlan(@NotNull @NotNull String planKey)
- Specified by:
listGroupsWithPermissionsForPlan
in interfacePlanPermissionsService
-
getGroupPermissionsForPlan
@NotNull public @NotNull List<BambooPermission> getGroupPermissionsForPlan(@NotNull @NotNull String planKey, @NotNull @NotNull String groupName)
- Specified by:
getGroupPermissionsForPlan
in interfacePlanPermissionsService
-
addGroupPermissionsToPlan
public boolean addGroupPermissionsToPlan(@NotNull @NotNull String planKey, @NotNull @NotNull String groupName, @NotNull @NotNull List<BambooPermission> permissionsToAdd)
- Specified by:
addGroupPermissionsToPlan
in interfacePlanPermissionsService
-
removeGroupPermissionsFromPlan
public boolean removeGroupPermissionsFromPlan(@NotNull @NotNull String planKey, @NotNull @NotNull String groupName, @NotNull @NotNull List<BambooPermission> permissionsToRemove)
- Specified by:
removeGroupPermissionsFromPlan
in interfacePlanPermissionsService
-
getLoggedInPermissionsForPlan
@NotNull public @NotNull List<BambooPermission> getLoggedInPermissionsForPlan(@NotNull @NotNull String planKey)
- Specified by:
getLoggedInPermissionsForPlan
in interfacePlanPermissionsService
-
addLoggedInPermissionsToPlan
public boolean addLoggedInPermissionsToPlan(@NotNull @NotNull String planKey, @NotNull @NotNull List<BambooPermission> permissionsToAdd)
- Specified by:
addLoggedInPermissionsToPlan
in interfacePlanPermissionsService
-
removeLoggedInPermissionsFromPlan
public boolean removeLoggedInPermissionsFromPlan(@NotNull @NotNull String planKey, @NotNull @NotNull List<BambooPermission> permissionsToRemove)
- Specified by:
removeLoggedInPermissionsFromPlan
in interfacePlanPermissionsService
-
getAnonymousPermissionsForPlan
@NotNull public @NotNull List<BambooPermission> getAnonymousPermissionsForPlan(@NotNull @NotNull String planKey)
- Specified by:
getAnonymousPermissionsForPlan
in interfacePlanPermissionsService
-
addAnonymousPermissionsToPlan
public boolean addAnonymousPermissionsToPlan(@NotNull @NotNull String planKey)
- Specified by:
addAnonymousPermissionsToPlan
in interfacePlanPermissionsService
-
removeAnonymousPermissionsFromPlan
public boolean removeAnonymousPermissionsFromPlan(@NotNull @NotNull String planKey)
- Specified by:
removeAnonymousPermissionsFromPlan
in interfacePlanPermissionsService
-
supportedPermissions
@NotNull public @NotNull Collection<BambooPermission> supportedPermissions()
Description copied from interface:PlanPermissionsService
Collection of permissions configurable for plans.Ordered by permission importance. Least granting permissions come first.
- Specified by:
supportedPermissions
in interfacePlanPermissionsService
-
permissionDependencies
@NotNull public @NotNull Collection<BambooPermission> permissionDependencies(@NotNull @NotNull BambooPermission permission)
Description copied from interface:PlanPermissionsService
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 interfacePlanPermissionsService
-
-