Interface UserPermissionAdminService
public interface UserPermissionAdminService
-
Method Summary
Modifier and TypeMethodDescriptionfindGroups(int start, int limit) List all groups that the Crowd console application can see.findGroupsByPrefix(String prefix, int start, int limit) List all groups that the Crowd console application can see, filtered by prefix.findGroupsWithPermission(int start, int limit) Find all groups with an explicit permission Note: there are no authentication checks in this methodfindGroupsWithPermissionByPrefix(String prefix, int start, int limit) Find all groups with an explicit permission Note: there are no authentication checks in this methodvoidRemove all permissions from the given group.voidsetPermissionForGroups(List<? extends DirectoryGroup> directoryGroupPairs, UserPermission permission) Set the granted permissions for each directoryGroup to permission.
-
Method Details
-
setPermissionForGroups
void setPermissionForGroups(List<? extends DirectoryGroup> directoryGroupPairs, UserPermission permission) throws DirectoryNotFoundException, OperationFailedException, ApplicationNotFoundException, UserPermissionDowngradeException, AnonymousUserPermissionException Set the granted permissions for each directoryGroup to permission. All other permissions will be revoked. Groups must be in directories that are mapped to the "crowd" application- Parameters:
directoryGroupPairs- list of groups to set permissions onpermission- permission to set to- Throws:
UserPermissionDowngradeException- if the user can not remove a permission because doing so would downgrade their own permissionsDirectoryNotFoundExceptionOperationFailedExceptionApplicationNotFoundExceptionAnonymousUserPermissionException
-
revokePermissionsForGroup
void revokePermissionsForGroup(DirectoryGroup group) throws DirectoryNotFoundException, OperationFailedException, ApplicationNotFoundException, UserPermissionDowngradeException, AnonymousUserPermissionException Remove all permissions from the given group.- Parameters:
group- group to remove permissions from- Throws:
UserPermissionDowngradeException- if the user can not remove a permission because doing so would downgrade their own permissionsDirectoryNotFoundExceptionOperationFailedExceptionApplicationNotFoundExceptionAnonymousUserPermissionException
-
findGroupsWithPermissionByPrefix
Page<PermittedGroup> findGroupsWithPermissionByPrefix(@Nonnull String prefix, int start, int limit) throws UserPermissionException, AnonymousUserPermissionException Find all groups with an explicit permission Note: there are no authentication checks in this method- Parameters:
prefix- filter group names by name prefixstart- index to start page atlimit- max number of results to return or 0 for no limit- Returns:
- the highest permission for each group with an explicit permission. If a group has ADMIN and SYS_ADMIN, only return SYS_ADMIN
- Throws:
UserPermissionExceptionAnonymousUserPermissionException
-
findGroupsWithPermission
Page<PermittedGroup> findGroupsWithPermission(int start, int limit) throws UserPermissionException, AnonymousUserPermissionException Find all groups with an explicit permission Note: there are no authentication checks in this method- Parameters:
start- index to start page atlimit- max number of results to return or 0 for no limit- Returns:
- the highest permission for each group with an explicit permission. If a group has ADMIN and SYS_ADMIN, only return SYS_ADMIN
- Throws:
UserPermissionExceptionAnonymousUserPermissionException
-
findGroupsByPrefix
Page<DirectoryGroup> findGroupsByPrefix(@Nonnull String prefix, int start, int limit) throws AnonymousUserPermissionException List all groups that the Crowd console application can see, filtered by prefix. Groups will be sorted by (directory name, group name) in dictionary order.- Parameters:
start- index to start page atlimit- max number of results to return or 0 for no limit- Throws:
AnonymousUserPermissionException
-
findGroups
List all groups that the Crowd console application can see. Groups will be sorted by (directory name, group name) in dictionary order.- Parameters:
start- index to start page atlimit- max number of results to return or 0 for no limit- Throws:
AnonymousUserPermissionException
-