Interface UserPermissionAdminService
public interface UserPermissionAdminService
-
Method Summary
Modifier and TypeMethodDescriptionPage<com.atlassian.crowd.manager.permission.DirectoryGroup> findGroups(int start, int limit) List all groups that the Crowd console application can see.Page<com.atlassian.crowd.manager.permission.DirectoryGroup> findGroupsByPrefix(String prefix, int start, int limit) List all groups that the Crowd console application can see, filtered by prefix.Page<com.atlassian.crowd.manager.permission.PermittedGroup> findGroupsWithPermission(int start, int limit) Find all groups with an explicit permission Note: there are no authentication checks in this methodPage<com.atlassian.crowd.manager.permission.PermittedGroup> findGroupsWithPermissionByPrefix(String prefix, int start, int limit) Find all groups with an explicit permission Note: there are no authentication checks in this methodvoidrevokePermissionsForGroup(com.atlassian.crowd.manager.permission.DirectoryGroup group) Remove all permissions from the given group.voidsetPermissionForGroups(List<? extends com.atlassian.crowd.manager.permission.DirectoryGroup> directoryGroupPairs, com.atlassian.crowd.model.permission.UserPermission permission) Set the granted permissions for each directoryGroup to permission.
-
Method Details
-
setPermissionForGroups
void setPermissionForGroups(List<? extends com.atlassian.crowd.manager.permission.DirectoryGroup> directoryGroupPairs, com.atlassian.crowd.model.permission.UserPermission permission) throws com.atlassian.crowd.exception.DirectoryNotFoundException, com.atlassian.crowd.exception.OperationFailedException, com.atlassian.crowd.exception.ApplicationNotFoundException, com.atlassian.crowd.manager.permission.UserPermissionDowngradeException, com.atlassian.crowd.manager.permission.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:
com.atlassian.crowd.manager.permission.UserPermissionDowngradeException- if the user can not remove a permission because doing so would downgrade their own permissionscom.atlassian.crowd.exception.DirectoryNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptioncom.atlassian.crowd.exception.ApplicationNotFoundExceptioncom.atlassian.crowd.manager.permission.AnonymousUserPermissionException
-
revokePermissionsForGroup
void revokePermissionsForGroup(com.atlassian.crowd.manager.permission.DirectoryGroup group) throws com.atlassian.crowd.exception.DirectoryNotFoundException, com.atlassian.crowd.exception.OperationFailedException, com.atlassian.crowd.exception.ApplicationNotFoundException, com.atlassian.crowd.manager.permission.UserPermissionDowngradeException, com.atlassian.crowd.manager.permission.AnonymousUserPermissionException Remove all permissions from the given group.- Parameters:
group- group to remove permissions from- Throws:
com.atlassian.crowd.manager.permission.UserPermissionDowngradeException- if the user can not remove a permission because doing so would downgrade their own permissionscom.atlassian.crowd.exception.DirectoryNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptioncom.atlassian.crowd.exception.ApplicationNotFoundExceptioncom.atlassian.crowd.manager.permission.AnonymousUserPermissionException
-
findGroupsWithPermissionByPrefix
Page<com.atlassian.crowd.manager.permission.PermittedGroup> findGroupsWithPermissionByPrefix(@Nonnull String prefix, int start, int limit) throws UserPermissionException, com.atlassian.crowd.manager.permission.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:
UserPermissionExceptioncom.atlassian.crowd.manager.permission.AnonymousUserPermissionException
-
findGroupsWithPermission
Page<com.atlassian.crowd.manager.permission.PermittedGroup> findGroupsWithPermission(int start, int limit) throws UserPermissionException, com.atlassian.crowd.manager.permission.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:
UserPermissionExceptioncom.atlassian.crowd.manager.permission.AnonymousUserPermissionException
-
findGroupsByPrefix
Page<com.atlassian.crowd.manager.permission.DirectoryGroup> findGroupsByPrefix(@Nonnull String prefix, int start, int limit) throws com.atlassian.crowd.manager.permission.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:
com.atlassian.crowd.manager.permission.AnonymousUserPermissionException
-
findGroups
Page<com.atlassian.crowd.manager.permission.DirectoryGroup> findGroups(int start, int limit) throws com.atlassian.crowd.manager.permission.AnonymousUserPermissionException 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:
com.atlassian.crowd.manager.permission.AnonymousUserPermissionException
-