@Transactional public class UserPermissionAdminServiceImpl extends Object implements UserPermissionAdminService
AdminRequiredInterceptor
via
applicationContext-CrowdServer.xml. For this reason we are not doing any permission checks inside this method,
except for ensuring that ADMINs cannot revoke or downgrade the permissions of SYSADMINs.Constructor and Description |
---|
UserPermissionAdminServiceImpl(InternalUserPermissionDAO permissionDAO,
UserPermissionService permissionService,
AuthenticatedUserProvider userProvider,
DirectoryManager directoryManager,
InternalApplicationHelper applicationHelper) |
Modifier and Type | Method and Description |
---|---|
Page<DirectoryGroup> |
findGroups(int start,
int limit)
List all groups that the Crowd console application can see.
|
Page<DirectoryGroup> |
findGroupsByPrefix(String prefix,
int start,
int limit)
List all groups that the Crowd console application can see, filtered by prefix.
|
Page<PermittedGroup> |
findGroupsWithPermission(int start,
int limit)
Find all groups with an explicit permission
Note: there are no authentication checks in this method
|
Page<PermittedGroup> |
findGroupsWithPermissionByPrefix(String prefix,
int start,
int limit)
Find all groups with an explicit permission
Note: there are no authentication checks in this method
|
void |
revokePermissionsForGroup(DirectoryGroup group)
Remove all permissions from the given group.
|
void |
setPermissionForGroups(List<? extends DirectoryGroup> directoryGroups,
UserPermission permission)
Set the granted permissions for each directoryGroup to permission.
|
public UserPermissionAdminServiceImpl(InternalUserPermissionDAO permissionDAO, UserPermissionService permissionService, AuthenticatedUserProvider userProvider, DirectoryManager directoryManager, InternalApplicationHelper applicationHelper)
public Page<DirectoryGroup> findGroups(int start, int limit)
UserPermissionAdminService
findGroups
in interface UserPermissionAdminService
start
- index to start page atlimit
- max number of results to return or 0 for no limitpublic Page<DirectoryGroup> findGroupsByPrefix(@Nonnull String prefix, int start, int limit)
UserPermissionAdminService
findGroupsByPrefix
in interface UserPermissionAdminService
start
- index to start page atlimit
- max number of results to return or 0 for no limitpublic void revokePermissionsForGroup(DirectoryGroup group) throws DirectoryNotFoundException, OperationFailedException, ApplicationNotFoundException, UserPermissionDowngradeException
UserPermissionAdminService
revokePermissionsForGroup
in interface UserPermissionAdminService
group
- group to remove permissions fromUserPermissionDowngradeException
- if the user can not remove a permission because
doing so would downgrade their own permissionsDirectoryNotFoundException
OperationFailedException
ApplicationNotFoundException
public void setPermissionForGroups(List<? extends DirectoryGroup> directoryGroups, UserPermission permission) throws DirectoryNotFoundException, OperationFailedException, ApplicationNotFoundException, UserPermissionException, UserPermissionDowngradeException
UserPermissionAdminService
setPermissionForGroups
in interface UserPermissionAdminService
directoryGroups
- list of groups to set permissions onpermission
- permission to set toUserPermissionDowngradeException
- if the user can not remove a permission because
doing so would downgrade their own permissionsDirectoryNotFoundException
OperationFailedException
ApplicationNotFoundException
UserPermissionException
public Page<PermittedGroup> findGroupsWithPermission(int start, int limit) throws UserPermissionException
UserPermissionAdminService
findGroupsWithPermission
in interface UserPermissionAdminService
start
- index to start page atlimit
- max number of results to return or 0 for no limitUserPermissionException
public Page<PermittedGroup> findGroupsWithPermissionByPrefix(@Nonnull String prefix, int start, int limit) throws UserPermissionException
UserPermissionAdminService
findGroupsWithPermissionByPrefix
in interface UserPermissionAdminService
prefix
- filter group names by name prefixstart
- index to start page atlimit
- max number of results to return or 0 for no limitUserPermissionException
Copyright © 2020 Atlassian. All rights reserved.