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 booleanaddAnonymousPermissionsToPlan(@NotNull String planKey)booleanaddGroupPermissionsToPlan(@NotNull String planKey, @NotNull String groupName, @NotNull List<BambooPermission> permissionsToAdd)booleanaddLoggedInPermissionsToPlan(@NotNull String planKey, @NotNull List<BambooPermission> permissionsToAdd)booleanaddUserPermissionsToPlan(@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.booleanremoveAnonymousPermissionsFromPlan(@NotNull String planKey)booleanremoveGroupPermissionsFromPlan(@NotNull String planKey, @NotNull String groupName, @NotNull List<BambooPermission> permissionsToRemove)booleanremoveLoggedInPermissionsFromPlan(@NotNull String planKey, @NotNull List<BambooPermission> permissionsToRemove)booleanremoveUserPermissionsFromPlan(@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:
listUsersWithPermissionsForPlanin interfacePlanPermissionsService
-
getUserPermissionsForPlan
@NotNull public @NotNull List<BambooPermission> getUserPermissionsForPlan(@NotNull @NotNull String planKey, @NotNull @NotNull String username)
- Specified by:
getUserPermissionsForPlanin interfacePlanPermissionsService
-
addUserPermissionsToPlan
public boolean addUserPermissionsToPlan(@NotNull @NotNull String planKey, @NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToAdd)- Specified by:
addUserPermissionsToPlanin interfacePlanPermissionsService
-
removeUserPermissionsFromPlan
public boolean removeUserPermissionsFromPlan(@NotNull @NotNull String planKey, @NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToRemove)- Specified by:
removeUserPermissionsFromPlanin interfacePlanPermissionsService
-
listGroupsWithPermissionsForPlan
@NotNull public @NotNull Iterable<String> listGroupsWithPermissionsForPlan(@NotNull @NotNull String planKey)
- Specified by:
listGroupsWithPermissionsForPlanin interfacePlanPermissionsService
-
getGroupPermissionsForPlan
@NotNull public @NotNull List<BambooPermission> getGroupPermissionsForPlan(@NotNull @NotNull String planKey, @NotNull @NotNull String groupName)
- Specified by:
getGroupPermissionsForPlanin interfacePlanPermissionsService
-
addGroupPermissionsToPlan
public boolean addGroupPermissionsToPlan(@NotNull @NotNull String planKey, @NotNull @NotNull String groupName, @NotNull @NotNull List<BambooPermission> permissionsToAdd)- Specified by:
addGroupPermissionsToPlanin interfacePlanPermissionsService
-
removeGroupPermissionsFromPlan
public boolean removeGroupPermissionsFromPlan(@NotNull @NotNull String planKey, @NotNull @NotNull String groupName, @NotNull @NotNull List<BambooPermission> permissionsToRemove)- Specified by:
removeGroupPermissionsFromPlanin interfacePlanPermissionsService
-
getLoggedInPermissionsForPlan
@NotNull public @NotNull List<BambooPermission> getLoggedInPermissionsForPlan(@NotNull @NotNull String planKey)
- Specified by:
getLoggedInPermissionsForPlanin interfacePlanPermissionsService
-
addLoggedInPermissionsToPlan
public boolean addLoggedInPermissionsToPlan(@NotNull @NotNull String planKey, @NotNull @NotNull List<BambooPermission> permissionsToAdd)- Specified by:
addLoggedInPermissionsToPlanin interfacePlanPermissionsService
-
removeLoggedInPermissionsFromPlan
public boolean removeLoggedInPermissionsFromPlan(@NotNull @NotNull String planKey, @NotNull @NotNull List<BambooPermission> permissionsToRemove)- Specified by:
removeLoggedInPermissionsFromPlanin interfacePlanPermissionsService
-
getAnonymousPermissionsForPlan
@NotNull public @NotNull List<BambooPermission> getAnonymousPermissionsForPlan(@NotNull @NotNull String planKey)
- Specified by:
getAnonymousPermissionsForPlanin interfacePlanPermissionsService
-
addAnonymousPermissionsToPlan
public boolean addAnonymousPermissionsToPlan(@NotNull @NotNull String planKey)- Specified by:
addAnonymousPermissionsToPlanin interfacePlanPermissionsService
-
removeAnonymousPermissionsFromPlan
public boolean removeAnonymousPermissionsFromPlan(@NotNull @NotNull String planKey)- Specified by:
removeAnonymousPermissionsFromPlanin interfacePlanPermissionsService
-
supportedPermissions
@NotNull public @NotNull Collection<BambooPermission> supportedPermissions()
Description copied from interface:PlanPermissionsServiceCollection of permissions configurable for plans.Ordered by permission importance. Least granting permissions come first.
- Specified by:
supportedPermissionsin interfacePlanPermissionsService
-
permissionDependencies
@NotNull public @NotNull Collection<BambooPermission> permissionDependencies(@NotNull @NotNull BambooPermission permission)
Description copied from interface:PlanPermissionsServiceObtain 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:
permissionDependenciesin interfacePlanPermissionsService
-
-