Interface GroupAdministrationPermissionService


@ExperimentalApi public interface GroupAdministrationPermissionService
Allows clients to check group permissions of users
Since:
3.3.0
  • Method Details

    • getAdministeredGroupsForCurrentUser

      List<UserGroupAdministrationMapping> getAdministeredGroupsForCurrentUser(@Nonnull AdministeredGroupsQuery query) throws com.atlassian.crowd.exception.OperationFailedException, com.atlassian.crowd.exception.FeatureInaccessibleException
      Looks for groups that currently logged in user administers
      Parameters:
      query - the criteria that the returned groups must meet or null for all groups
      Returns:
      a set of mappings containing all groups currently logged in user administers
      Throws:
      IllegalStateException - if user associated with the current session, no more exists in the directory
      com.atlassian.crowd.exception.OperationFailedException
      com.atlassian.crowd.exception.FeatureInaccessibleException
    • getAdministeredGroups

      List<UserGroupAdministrationMapping> getAdministeredGroups(com.atlassian.crowd.model.user.User user, @Nonnull AdministeredGroupsQuery query) throws com.atlassian.crowd.exception.OperationFailedException, com.atlassian.crowd.exception.FeatureInaccessibleException
      Looks for groups a user administers
      Parameters:
      user - the user
      query - the criteria that the returned groups must meet or null for all groups
      Returns:
      a set of mappings containing all groups user can administer
      Throws:
      IllegalStateException - if the supplied user doesn't exists
      com.atlassian.crowd.exception.OperationFailedException
      com.atlassian.crowd.exception.FeatureInaccessibleException
    • isUserGroupLevelAdmin

      boolean isUserGroupLevelAdmin(com.atlassian.crowd.model.user.User user) throws com.atlassian.crowd.exception.OperationFailedException
      Parameters:
      user - the user
      Returns:
      true if the specified user administers at least one group, either through a directly assigned grant or through memberships
      Throws:
      com.atlassian.crowd.exception.OperationFailedException
    • isCurrentUserAdminOfGroup

      boolean isCurrentUserAdminOfGroup(com.atlassian.crowd.model.group.Group group) throws com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.DirectoryNotFoundException, com.atlassian.crowd.exception.OperationFailedException, com.atlassian.crowd.exception.FeatureInaccessibleException
      Check if a current logged in user is an administrator of a group
      Parameters:
      group - the group
      Returns:
      true if the user is an administrator of the group, false otherwise
      Throws:
      com.atlassian.crowd.exception.GroupNotFoundException
      com.atlassian.crowd.exception.UserNotFoundException
      com.atlassian.crowd.exception.DirectoryNotFoundException
      com.atlassian.crowd.exception.OperationFailedException
      com.atlassian.crowd.exception.FeatureInaccessibleException
    • isUserAdminOfGroup

      boolean isUserAdminOfGroup(com.atlassian.crowd.model.user.User user, com.atlassian.crowd.model.group.Group group) throws com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.DirectoryNotFoundException, com.atlassian.crowd.exception.OperationFailedException, com.atlassian.crowd.exception.FeatureInaccessibleException
      Check if a user is an administrator of a group
      Parameters:
      user - the user
      group - the group
      Returns:
      true if the user is an administrator of the group, false otherwise
      Throws:
      com.atlassian.crowd.exception.GroupNotFoundException
      com.atlassian.crowd.exception.UserNotFoundException
      com.atlassian.crowd.exception.DirectoryNotFoundException
      com.atlassian.crowd.exception.OperationFailedException
      com.atlassian.crowd.exception.FeatureInaccessibleException
    • getDirectGroupLevelAdminUsers

      Set<com.atlassian.crowd.model.user.User> getDirectGroupLevelAdminUsers(boolean considerOnlyTargetGroupsWithApplications)
      Parameters:
      considerOnlyTargetGroupsWithApplications - whether only groups with mapped application should be taken into account
      Returns:
      set of users with direct grants to manage any group
    • getDirectGroupLevelAdminGroups

      Set<com.atlassian.crowd.model.group.Group> getDirectGroupLevelAdminGroups(boolean considerOnlyTargetGroupsWithApplications)
      Parameters:
      considerOnlyTargetGroupsWithApplications - whether only groups with mapped application should be taken into account
      Returns:
      set of groups with direct grants to manage any group