Interface UserPermissionAdminService


public interface UserPermissionAdminService
  • Method Summary

    Modifier and Type
    Method
    Description
    Page<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 method
    Page<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 method
    void
    revokePermissionsForGroup(com.atlassian.crowd.manager.permission.DirectoryGroup group)
    Remove all permissions from the given group.
    void
    setPermissionForGroups(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 on
      permission - 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 permissions
      com.atlassian.crowd.exception.DirectoryNotFoundException
      com.atlassian.crowd.exception.OperationFailedException
      com.atlassian.crowd.exception.ApplicationNotFoundException
      com.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 permissions
      com.atlassian.crowd.exception.DirectoryNotFoundException
      com.atlassian.crowd.exception.OperationFailedException
      com.atlassian.crowd.exception.ApplicationNotFoundException
      com.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 prefix
      start - index to start page at
      limit - 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:
      UserPermissionException
      com.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 at
      limit - 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:
      UserPermissionException
      com.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 at
      limit - 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 at
      limit - max number of results to return or 0 for no limit
      Throws:
      com.atlassian.crowd.manager.permission.AnonymousUserPermissionException