Package com.atlassian.bamboo.repository
Class DefaultRepositoryPermissionsService
- java.lang.Object
-
- com.atlassian.bamboo.repository.DefaultRepositoryPermissionsService
-
- All Implemented Interfaces:
RepositoryPermissionsService
public class DefaultRepositoryPermissionsService extends Object implements RepositoryPermissionsService
-
-
Constructor Summary
Constructors Constructor Description DefaultRepositoryPermissionsService(TransactionAndHibernateTemplate hibernateTemplate, HibernateMutableAclService aclService, BambooAclHelper aclHelper, RepositoryDefinitionManager repositoryDefinitionManager, BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addGroupPermissionsToRepository(long repositoryId, @NotNull String groupName, @NotNull List<BambooPermission> permissionsToAdd)
boolean
addLoggedInPermissionsToRepository(long repositoryId, @NotNull List<BambooPermission> permissionsToAdd)
boolean
addUserPermissionsToRepository(long repositoryId, @NotNull String username, @NotNull List<BambooPermission> permissionsToAdd)
@NotNull List<BambooPermission>
getGroupPermissionsForRepository(long repositoryId, @NotNull String groupName)
@NotNull List<BambooPermission>
getLoggedInPermissionsForRepository(long repositoryId)
@NotNull List<BambooPermission>
getUserPermissionsForRepository(long repositoryId, @NotNull String username)
@NotNull Iterable<String>
listGroupsWithPermissionsForRepository(long repositoryId)
@NotNull Iterable<String>
listUsersWithPermissionsForRepository(long repositoryId)
@NotNull Collection<BambooPermission>
permissionDependencies(@NotNull BambooPermission permission)
Obtain a collection of Bamboo permissions dependent on the passedpermission
.boolean
removeGroupPermissionsFromRepository(long repositoryId, @NotNull String groupName, @NotNull List<BambooPermission> permissionsToRemove)
boolean
removeLoggedInPermissionsFromRepository(long repositoryId, @NotNull List<BambooPermission> permissionsToRemove)
boolean
removeUserPermissionsFromRepository(long repositoryId, @NotNull String username, @NotNull List<BambooPermission> permissionsToRemove)
@NotNull Collection<BambooPermission>
supportedPermissions()
Collection of permissions configurable for linked repositories.
-
-
-
Constructor Detail
-
DefaultRepositoryPermissionsService
@Autowired public DefaultRepositoryPermissionsService(TransactionAndHibernateTemplate hibernateTemplate, HibernateMutableAclService aclService, BambooAclHelper aclHelper, RepositoryDefinitionManager repositoryDefinitionManager, BambooPermissionManager bambooPermissionManager, BambooUserManager bambooUserManager)
-
-
Method Detail
-
listUsersWithPermissionsForRepository
@NotNull public @NotNull Iterable<String> listUsersWithPermissionsForRepository(long repositoryId)
- Specified by:
listUsersWithPermissionsForRepository
in interfaceRepositoryPermissionsService
-
getUserPermissionsForRepository
@NotNull public @NotNull List<BambooPermission> getUserPermissionsForRepository(long repositoryId, @NotNull @NotNull String username)
- Specified by:
getUserPermissionsForRepository
in interfaceRepositoryPermissionsService
-
addUserPermissionsToRepository
public boolean addUserPermissionsToRepository(long repositoryId, @NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToAdd)
- Specified by:
addUserPermissionsToRepository
in interfaceRepositoryPermissionsService
-
removeUserPermissionsFromRepository
public boolean removeUserPermissionsFromRepository(long repositoryId, @NotNull @NotNull String username, @NotNull @NotNull List<BambooPermission> permissionsToRemove)
- Specified by:
removeUserPermissionsFromRepository
in interfaceRepositoryPermissionsService
-
listGroupsWithPermissionsForRepository
@NotNull public @NotNull Iterable<String> listGroupsWithPermissionsForRepository(long repositoryId)
- Specified by:
listGroupsWithPermissionsForRepository
in interfaceRepositoryPermissionsService
-
getGroupPermissionsForRepository
@NotNull public @NotNull List<BambooPermission> getGroupPermissionsForRepository(long repositoryId, @NotNull @NotNull String groupName)
- Specified by:
getGroupPermissionsForRepository
in interfaceRepositoryPermissionsService
-
addGroupPermissionsToRepository
public boolean addGroupPermissionsToRepository(long repositoryId, @NotNull @NotNull String groupName, @NotNull @NotNull List<BambooPermission> permissionsToAdd)
- Specified by:
addGroupPermissionsToRepository
in interfaceRepositoryPermissionsService
-
removeGroupPermissionsFromRepository
public boolean removeGroupPermissionsFromRepository(long repositoryId, @NotNull @NotNull String groupName, @NotNull @NotNull List<BambooPermission> permissionsToRemove)
- Specified by:
removeGroupPermissionsFromRepository
in interfaceRepositoryPermissionsService
-
getLoggedInPermissionsForRepository
@NotNull public @NotNull List<BambooPermission> getLoggedInPermissionsForRepository(long repositoryId)
- Specified by:
getLoggedInPermissionsForRepository
in interfaceRepositoryPermissionsService
-
addLoggedInPermissionsToRepository
public boolean addLoggedInPermissionsToRepository(long repositoryId, @NotNull @NotNull List<BambooPermission> permissionsToAdd)
- Specified by:
addLoggedInPermissionsToRepository
in interfaceRepositoryPermissionsService
-
removeLoggedInPermissionsFromRepository
public boolean removeLoggedInPermissionsFromRepository(long repositoryId, @NotNull @NotNull List<BambooPermission> permissionsToRemove)
- Specified by:
removeLoggedInPermissionsFromRepository
in interfaceRepositoryPermissionsService
-
supportedPermissions
@NotNull public @NotNull Collection<BambooPermission> supportedPermissions()
Description copied from interface:RepositoryPermissionsService
Collection of permissions configurable for linked repositories.Ordered by permission importance. Least granting permissions come first.
- Specified by:
supportedPermissions
in interfaceRepositoryPermissionsService
-
permissionDependencies
@NotNull public @NotNull Collection<BambooPermission> permissionDependencies(@NotNull @NotNull BambooPermission permission)
Description copied from interface:RepositoryPermissionsService
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 interfaceRepositoryPermissionsService
-
-