Package com.atlassian.bamboo.security
Class DefaultGlobalPermissionsService
java.lang.Object
com.atlassian.bamboo.security.DefaultGlobalPermissionsService
- All Implemented Interfaces:
GlobalPermissionsService
-
Constructor Summary
ConstructorDescriptionDefaultGlobalPermissionsService
(TransactionAndHibernateTemplate hibernateTemplate, HibernateMutableAclService aclService, BambooAclHelper aclHelper, BambooAclUpdateHelper aclUpdateHelper, AdministrationConfigurationAccessor administrationConfigurationAccessor, AdministrationConfigurationPersister administrationConfigurationPersister, BambooUserManager bambooUserManager, BambooPermissionManager bambooPermissionManager, AuditLogService auditLogService) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addGroupGlobalPermissions
(@NotNull String groupName, @NotNull List<BambooPermission> permissionsToAdd) boolean
addLoggedInGlobalPermissions
(@NotNull List<BambooPermission> permissionsToAdd) boolean
addUserGlobalPermissions
(@NotNull String username, @NotNull List<BambooPermission> permissionsToAdd) @NotNull Collection<BambooPermission>
Collection of global permissions which are editable by current user.@NotNull List<BambooPermission>
@NotNull List<BambooPermission>
getGroupGlobalPermissions
(@NotNull String groupName) @NotNull List<BambooPermission>
@NotNull List<BambooPermission>
getUserGlobalPermissions
(@NotNull String username) @NotNull Collection<BambooPermission>
permissionDependencies
(@NotNull BambooPermission permission) Obtain a collection of Bamboo permissions dependent on the passedpermission
.boolean
boolean
removeGroupGlobalPermissions
(@NotNull String groupName, @NotNull List<BambooPermission> permissionsToRemove) boolean
removeLoggedInGlobalPermissions
(@NotNull List<BambooPermission> permissionsToRemove) boolean
removeUserGlobalPermissions
(@NotNull String username, @NotNull List<BambooPermission> permissionsToRemove) @NotNull Collection<BambooPermission>
Collection of permissions configurable on application level.
-
Constructor Details
-
DefaultGlobalPermissionsService
@Autowired public DefaultGlobalPermissionsService(TransactionAndHibernateTemplate hibernateTemplate, HibernateMutableAclService aclService, BambooAclHelper aclHelper, BambooAclUpdateHelper aclUpdateHelper, AdministrationConfigurationAccessor administrationConfigurationAccessor, AdministrationConfigurationPersister administrationConfigurationPersister, BambooUserManager bambooUserManager, BambooPermissionManager bambooPermissionManager, AuditLogService auditLogService)
-
-
Method Details
-
listUsersWithGlobalPermissions
- Specified by:
listUsersWithGlobalPermissions
in interfaceGlobalPermissionsService
-
getUserGlobalPermissions
@NotNull public @NotNull List<BambooPermission> getUserGlobalPermissions(@NotNull @NotNull String username) - Specified by:
getUserGlobalPermissions
in interfaceGlobalPermissionsService
-
addUserGlobalPermissions
public boolean addUserGlobalPermissions(@NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToAdd) - Specified by:
addUserGlobalPermissions
in interfaceGlobalPermissionsService
-
removeUserGlobalPermissions
public boolean removeUserGlobalPermissions(@NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToRemove) - Specified by:
removeUserGlobalPermissions
in interfaceGlobalPermissionsService
-
listGroupsWithGlobalPermissions
- Specified by:
listGroupsWithGlobalPermissions
in interfaceGlobalPermissionsService
-
getGroupGlobalPermissions
@NotNull public @NotNull List<BambooPermission> getGroupGlobalPermissions(@NotNull @NotNull String groupName) - Specified by:
getGroupGlobalPermissions
in interfaceGlobalPermissionsService
-
addGroupGlobalPermissions
public boolean addGroupGlobalPermissions(@NotNull @NotNull String groupName, @NotNull @NotNull List<BambooPermission> permissionsToAdd) - Specified by:
addGroupGlobalPermissions
in interfaceGlobalPermissionsService
-
removeGroupGlobalPermissions
public boolean removeGroupGlobalPermissions(@NotNull @NotNull String groupName, @NotNull @NotNull List<BambooPermission> permissionsToRemove) - Specified by:
removeGroupGlobalPermissions
in interfaceGlobalPermissionsService
-
getLoggedInGlobalPermissions
- Specified by:
getLoggedInGlobalPermissions
in interfaceGlobalPermissionsService
-
addLoggedInGlobalPermissions
public boolean addLoggedInGlobalPermissions(@NotNull @NotNull List<BambooPermission> permissionsToAdd) - Specified by:
addLoggedInGlobalPermissions
in interfaceGlobalPermissionsService
-
removeLoggedInGlobalPermissions
public boolean removeLoggedInGlobalPermissions(@NotNull @NotNull List<BambooPermission> permissionsToRemove) - Specified by:
removeLoggedInGlobalPermissions
in interfaceGlobalPermissionsService
-
getAnonymousGlobalPermissions
- Specified by:
getAnonymousGlobalPermissions
in interfaceGlobalPermissionsService
-
addAnonymousGlobalPermissions
public boolean addAnonymousGlobalPermissions()- Specified by:
addAnonymousGlobalPermissions
in interfaceGlobalPermissionsService
-
removeAnonymousGlobalPermissions
public boolean removeAnonymousGlobalPermissions()- Specified by:
removeAnonymousGlobalPermissions
in interfaceGlobalPermissionsService
-
supportedPermissions
Description copied from interface:GlobalPermissionsService
Collection of permissions configurable on application level.Ordered by permission importance. Least granting permissions come first.
- Specified by:
supportedPermissions
in interfaceGlobalPermissionsService
-
editablePermissions
Description copied from interface:GlobalPermissionsService
Collection of global permissions which are editable by current user. For example, a restricted administrator shouldn't be allowed to grant or revokeBambooPermission.ADMINISTRATION
.- Specified by:
editablePermissions
in interfaceGlobalPermissionsService
-
permissionDependencies
@NotNull public @NotNull Collection<BambooPermission> permissionDependencies(@NotNull @NotNull BambooPermission permission) Description copied from interface:GlobalPermissionsService
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 interfaceGlobalPermissionsService
-