Class ReadOnlyUserAccessor

java.lang.Object
com.atlassian.confluence.user.ReadOnlyUserAccessor
All Implemented Interfaces:
UserAccessor, UserAccessorInternal, ConfluenceUserResolver, GroupMembershipAccessor, GroupResolver, UserAccessor, UserExistenceChecker, UserPreferencesAccessor, UserProfilePictureAccessor, com.atlassian.user.search.query.EntityQueryParser

public class ReadOnlyUserAccessor extends Object implements UserAccessorInternal
For use in the Velocity context.
Since:
8.8
  • Constructor Details

  • Method Details

    • addUser

      public com.atlassian.user.User addUser(String username, String password, String email, String fullname, String[] groups)
      Specified by:
      addUser in interface UserAccessor
    • addUser

      public com.atlassian.user.User addUser(String username, String password, String email, String fullname)
      Specified by:
      addUser in interface UserAccessor
    • getUserNames

      public com.atlassian.user.search.page.Pager<String> getUserNames()
      Description copied from interface: UserAccessor
      Returns a pager of all usernames in the system. Clients should not normally use this method, but perform a search using UserAccessor.findUsers(Query) or the CrowdService API instead.
      Specified by:
      getUserNames in interface UserAccessor
    • getUsers

      public com.atlassian.user.search.page.Pager<com.atlassian.user.User> getUsers()
      Description copied from interface: UserAccessor
      Returns a pager of all users in the system. Clients should not normally use this method, but perform a search using UserAccessor.findUsers(Query) or the CrowdService API instead.
      Specified by:
      getUsers in interface UserAccessor
    • getGroup

      public com.atlassian.user.Group getGroup(String name)
      Description copied from interface: UserAccessor
      Returns the group with the specified name, or null if the user doesn't exist or the name is null.
      Specified by:
      getGroup in interface GroupResolver
      Specified by:
      getGroup in interface UserAccessor
    • getGroups

      public com.atlassian.user.search.page.Pager<com.atlassian.user.Group> getGroups()
      Description copied from interface: UserAccessor
      Returns a pager of all groups in the system. Clients should not normally use this method, but perform a search using EntityQueryParser.findGroups(Query) or the CrowdService API instead.
      Specified by:
      getGroups in interface UserAccessor
    • addGroup

      public com.atlassian.user.Group addGroup(String name)
      Description copied from interface: UserAccessor
      Creates a group with the specified name and returns it.
      Specified by:
      addGroup in interface UserAccessor
    • removeGroup

      public void removeGroup(com.atlassian.user.Group group)
      Description copied from interface: UserAccessor
      Removes the specified group. Does nothing if the group does not exist.
      Specified by:
      removeGroup in interface UserAccessor
    • removeUser

      public void removeUser(com.atlassian.user.User user) throws com.atlassian.core.exception.InfrastructureException
      Description copied from interface: UserAccessor
      Removes the specified user. Does nothing if the user does not exist.
      Specified by:
      removeUser in interface UserAccessor
      Throws:
      com.atlassian.core.exception.InfrastructureException - if the user could not be removed
    • getGroupCreateIfNecessary

      public com.atlassian.user.Group getGroupCreateIfNecessary(String name)
      Specified by:
      getGroupCreateIfNecessary in interface UserAccessor
    • getUserPreferences

      @Deprecated public UserPreferences getUserPreferences(com.atlassian.user.User user)
      Deprecated.
      Specified by:
      getUserPreferences in interface UserAccessor
    • saveUser

      public void saveUser(com.atlassian.user.User user)
      Description copied from interface: UserAccessor
      Persists changes made to a user (e.g. changing email or full name).
      Specified by:
      saveUser in interface UserAccessor
    • getUsersByEmail

      public com.atlassian.user.search.SearchResult getUsersByEmail(String email)
      Specified by:
      getUsersByEmail in interface UserAccessor
    • deactivateUser

      public void deactivateUser(com.atlassian.user.User user)
      Description copied from interface: UserAccessor
      Deactivate the specified user, which prevents them logging in. Does nothing if the user is already deactivated.
      Specified by:
      deactivateUser in interface UserAccessor
    • reactivateUser

      public void reactivateUser(com.atlassian.user.User user)
      Description copied from interface: UserAccessor
      Marks the specified user as active, which allows them to log in. Does nothing if the user is already active.
      Specified by:
      reactivateUser in interface UserAccessor
    • isUserRemovable

      public boolean isUserRemovable(com.atlassian.user.User user) throws com.atlassian.user.EntityException
      Specified by:
      isUserRemovable in interface UserAccessor
      Throws:
      com.atlassian.user.EntityException
    • getGroups

      public com.atlassian.user.search.page.Pager<com.atlassian.user.Group> getGroups(com.atlassian.user.User user)
      Specified by:
      getGroups in interface UserAccessor
    • hasMembership

      public boolean hasMembership(com.atlassian.user.Group group, com.atlassian.user.User user)
      Description copied from interface: UserAccessor
      Returns true if the specified user and group both exist, and the user is a member of the group (either directly or as a member of a nested group). In all other circumstances, returns false.
      Specified by:
      hasMembership in interface UserAccessor
    • hasMembership

      public boolean hasMembership(String groupName, String username)
      Description copied from interface: UserAccessor
      Returns true if the specified user and group both exist, and the user is a member of the group (either directly or as a member of a nested group). In all other circumstances, returns false.
      Specified by:
      hasMembership in interface UserAccessor
    • addMembership

      public void addMembership(com.atlassian.user.Group group, com.atlassian.user.User user)
      Specified by:
      addMembership in interface UserAccessor
    • addMembership

      public void addMembership(String groupname, String username)
      Specified by:
      addMembership in interface UserAccessor
    • removeMembership

      public boolean removeMembership(com.atlassian.user.Group group, com.atlassian.user.User user)
      Specified by:
      removeMembership in interface UserAccessor
    • getMemberNames

      public com.atlassian.user.search.page.Pager<String> getMemberNames(com.atlassian.user.Group group)
      Description copied from interface: UserAccessor
      Returns a pager containing the usernames of users who are members of the specified group (either directly or as a member of a nested group). Returns an empty pager if the group has no members or doesn't exist.
      Specified by:
      getMemberNames in interface GroupMembershipAccessor
      Specified by:
      getMemberNames in interface UserAccessor
    • createGroup

      public com.atlassian.user.Group createGroup(String groupname)
      Specified by:
      createGroup in interface UserAccessor
    • authenticate

      public boolean authenticate(String username, String password)
      Specified by:
      authenticate in interface UserAccessor
    • findUsers

      public com.atlassian.user.search.SearchResult<com.atlassian.user.User> findUsers(com.atlassian.user.search.query.Query<com.atlassian.user.User> search) throws com.atlassian.user.EntityException
      Specified by:
      findUsers in interface com.atlassian.user.search.query.EntityQueryParser
      Specified by:
      findUsers in interface UserAccessor
      Throws:
      com.atlassian.user.EntityException
    • findGroups

      public com.atlassian.user.search.SearchResult<com.atlassian.user.Group> findGroups(com.atlassian.user.search.query.Query<com.atlassian.user.Group> query) throws com.atlassian.user.EntityException
      Specified by:
      findGroups in interface com.atlassian.user.search.query.EntityQueryParser
      Throws:
      com.atlassian.user.EntityException
    • findUsers

      public com.atlassian.user.search.SearchResult<com.atlassian.user.User> findUsers(com.atlassian.user.search.query.Query<com.atlassian.user.User> query, com.atlassian.user.search.query.QueryContext context) throws com.atlassian.user.EntityException
      Specified by:
      findUsers in interface com.atlassian.user.search.query.EntityQueryParser
      Throws:
      com.atlassian.user.EntityException
    • findGroups

      public com.atlassian.user.search.SearchResult<com.atlassian.user.Group> findGroups(com.atlassian.user.search.query.Query<com.atlassian.user.Group> query, com.atlassian.user.search.query.QueryContext context) throws com.atlassian.user.EntityException
      Specified by:
      findGroups in interface com.atlassian.user.search.query.EntityQueryParser
      Throws:
      com.atlassian.user.EntityException
    • alterPassword

      public void alterPassword(com.atlassian.user.User user, String plainTextPassword) throws com.atlassian.user.EntityException
      Specified by:
      alterPassword in interface UserAccessor
      Throws:
      com.atlassian.user.EntityException
    • removeMembership

      public boolean removeMembership(String groupname, String username)
      Specified by:
      removeMembership in interface UserAccessor
    • getUsers

      public @NonNull PageResponse<ConfluenceUser> getUsers(LimitedRequest limitedRequest)
      Description copied from interface: ConfluenceUserResolver
      Get fully backed (active or disabled) Confluence Users. When both embedded Crowd tables and Confluence user tables have the same user, that user can be retrieved.

      This means, when embedded crowd has the user, but Confluence does not (unsynced, externally deleted, shadowed), the user is not retrievable.

      This means, when embedded crowd has a user, but Confluence does not, the user is not retrievable.
      Specified by:
      getUsers in interface ConfluenceUserResolver
      Parameters:
      limitedRequest - the limited request for ConfluenceUser
      Returns:
      a non-null page response of ConfluenceUser.
    • getExistingUserByPerson

      public @Nullable ConfluenceUser getExistingUserByPerson(Person person)
      Description copied from interface: UserAccessorInternal
      Retrieve the corresponding ConfluenceUser (if any) for a Person, by username, or user key
      Specified by:
      getExistingUserByPerson in interface ConfluenceUserResolver
      Specified by:
      getExistingUserByPerson in interface UserAccessorInternal
      Parameters:
      person - the person whose corresponding ConfluenceUser should be retrieved
      Returns:
      Person as a confluence user, or null if user doesn't exist or if person is Anonymous
    • getExistingByApiUser

      public Optional<ConfluenceUser> getExistingByApiUser(User user)
      Description copied from interface: UserAccessorInternal
      Retrieve the corresponding ConfluenceUser (if any) for a user, by user key or username

      One of username or userkey must be set on the user object.

      This method differs from UserAccessorInternal.getExistingUserByPerson(com.atlassian.confluence.api.model.people.Person) in its handling of anonymous, it is not possible to retrieve an anonymous user from this method. When a Option.none() is returned from this method it indicates that the user was not found in the user repository.

      Specified by:
      getExistingByApiUser in interface ConfluenceUserResolver
      Specified by:
      getExistingByApiUser in interface UserAccessorInternal
      Parameters:
      user - the user whose corresponding ConfluenceUser should be retrieved
      Returns:
      an optional confluence user if the user is found by userkey or username
    • isDeletedUser

      public boolean isDeletedUser(ConfluenceUser user)
      Description copied from interface: UserAccessorInternal
      Checks whether or not a user has been deleted from the application
      Specified by:
      isDeletedUser in interface UserAccessorInternal
      Parameters:
      user - the user to check
      Returns:
      true if the user has been deleted from the application, false otherwise (even if the user doesn't exist)
    • isUnsyncedUser

      public boolean isUnsyncedUser(ConfluenceUser user)
      Description copied from interface: UserAccessorInternal
      Checks whether or not a user is unsynced
      Specified by:
      isUnsyncedUser in interface UserAccessorInternal
      Parameters:
      user - the user to check
      Returns:
      true if the user is unsynced, false otherwise (even if the user doesn't exist)
    • isCrowdManaged

      public boolean isCrowdManaged(ConfluenceUser user)
      Description copied from interface: UserAccessorInternal
      Checks whether or not embedded Crowd manages/has knowledge of a given user
      Specified by:
      isCrowdManaged in interface UserAccessorInternal
      Returns:
      true if the user is managed by embedded Crowd, false otherwise (even if the user doesn't exist)
    • searchUnsyncedUsers

      public com.atlassian.user.search.page.Pager<ConfluenceUser> searchUnsyncedUsers(String searchParam)
      Description copied from interface: UserAccessorInternal
      Returns a list of all users for the given username search parameter that are unsynced: a user whose account has been disconnected from an external directory, i.e. a user who has a known mapping but no backing user, but who has not yet been deleted from the application.
      Specified by:
      searchUnsyncedUsers in interface UserAccessorInternal
      Parameters:
      searchParam - the username parameter to search by
      Returns:
      a pager of all unknown / unsynced users
    • getUser

      public com.atlassian.user.User getUser(String name)
      Description copied from interface: UserAccessor
      Returns the user with the specified name, or null if the user doesn't exist or the name is null. Note that use rname lookups are case-insensitive, so the user you get back may not have exactly the same name as the name passed to this method.
      Specified by:
      getUser in interface UserAccessor
      Specified by:
      getUser in interface UserAccessor
      Parameters:
      name - the user name of the user
      Returns:
      the User with the supplied user name or null.
    • getUserByName

      public @Nullable ConfluenceUser getUserByName(String name)
      Description copied from interface: UserAccessor
      Returns the ConfluenceUser with the supplied user name or null if the user doesn't exist or the supplied name is null.

      Note that user name lookups are case-insensitive, so the user you get back may not have exactly the same name as the name passed to this method.

      Specified by:
      getUserByName in interface ConfluenceUserResolver
      Specified by:
      getUserByName in interface UserAccessor
      Parameters:
      name - the user name of the user
      Returns:
      the ConfluenceUser with the supplied user name or null.
    • getUserByKey

      public @Nullable ConfluenceUser getUserByKey(com.atlassian.sal.api.user.UserKey key)
      Description copied from interface: UserAccessor
      Returns the user with the specified user key, or null if the user has never existed or the key is null.

      WARNING: This method can return deleted users. Use UserAccessor.getExistingUserByKey(com.atlassian.sal.api.user.UserKey) to get only users that exist.

      Specified by:
      getUserByKey in interface ConfluenceUserResolver
      Specified by:
      getUserByKey in interface UserAccessor
    • getExistingUserByKey

      public @Nullable ConfluenceUser getExistingUserByKey(com.atlassian.sal.api.user.UserKey key)
      Description copied from interface: UserAccessor
      Returns the user with the specified user key, or null if the user doesn't exist or the key is null.
      Specified by:
      getExistingUserByKey in interface ConfluenceUserResolver
      Specified by:
      getExistingUserByKey in interface UserAccessor
    • exists

      public boolean exists(String name)
      Description copied from interface: UserAccessor
      Returns true if a user exists with the given username. This method is significantly faster than getUser(name) != null.
      Specified by:
      exists in interface UserAccessor
      Specified by:
      exists in interface UserExistenceChecker
      Parameters:
      name - username of the user
      Returns:
      true if a user exists with the given username
    • createUser

      public ConfluenceUser createUser(com.atlassian.user.User userTemplate, com.atlassian.user.security.password.Credential password)
      Description copied from interface: UserAccessor
      Specified by:
      createUser in interface UserAccessor
      Specified by:
      createUser in interface UserAccessor
    • isReadOnly

      public boolean isReadOnly(com.atlassian.user.User user)
      Description copied from interface: UserAccessor
      Returns true if the user cannot be modified or removed. However, returning false does necessarily confirm that the user can be modified or removed. Depending on the user management configuration, it is not always possible for Confluence to determine whether a user is read-only.

      In an internal-only user management configuration, this method always returns false.

      Specified by:
      isReadOnly in interface UserAccessor
    • isReadOnly

      public boolean isReadOnly(com.atlassian.user.Group group)
      Description copied from interface: UserAccessor
      Returns true if the group cannot be modified or removed. However, returning false does necessarily confirm that the group can be modified or removed. Depending on the user management configuration, it is not always possible for Confluence to determine whether a group is read-only. Indeed, groups can span across multiple directories with different access control mechanisms, so it may be possible to modify certain memberships of a group but not others.

      In an internal-only user management configuration, this method always returns false.

      Specified by:
      isReadOnly in interface UserAccessor
    • getUserProfilePicture

      public ProfilePictureInfo getUserProfilePicture(@Nullable com.atlassian.user.User user)
      Description copied from interface: UserAccessor
      Retrieve the path to a user's personal picture
      Specified by:
      getUserProfilePicture in interface UserAccessor
      Specified by:
      getUserProfilePicture in interface UserProfilePictureAccessor
      Parameters:
      user - the user whose picture to look up.
      Returns:
      The path to a user's personal picture, or null if they don't have one set.
    • getConfluenceUserPreferences

      @Deprecated public ConfluenceUserPreferences getConfluenceUserPreferences(@Nullable com.atlassian.user.User user)
      Deprecated.
      Specified by:
      getConfluenceUserPreferences in interface UserAccessor
      Specified by:
      getConfluenceUserPreferences in interface UserPreferencesAccessor
    • isSuperUser

      public boolean isSuperUser(com.atlassian.user.User user)
      Description copied from interface: UserAccessor
      Return true is the user is a super user. This should not be used to infer any special permission exempt behaviours. In general, relying on group memberships for special behaviour is a bad idea. Permission checks in the application like PermissionManager.hasPermission(User, Permission, Object) already take care of super-user permission exempt checks and more. If checking for exemption from any permission checks is still required explicitly, use PermissionManager.isConfluenceAdministrator(User) instead. It also takes care of more checks than a group-membership for permission exemption. e.g. Checking exemptions before applying permission related query and/or filter, see AlphabeticalListPagesAction.getFilter(ConfluenceUser)
      Specified by:
      isSuperUser in interface UserAccessor
      Parameters:
      user - the user to check for (the null user will always return false)
      Returns:
      true if the user is super-user, false otherwise.
    • getGroupsAsList

      public List<com.atlassian.user.Group> getGroupsAsList()
      Specified by:
      getGroupsAsList in interface UserAccessor
    • getMemberNamesAsList

      public List<String> getMemberNamesAsList(com.atlassian.user.Group group)
      Description copied from interface: UserAccessor
      Same as UserAccessor.getMemberNames(com.atlassian.user.Group) but returns a List of user names as Strings rather than a Pager.
      Specified by:
      getMemberNamesAsList in interface GroupMembershipAccessor
      Specified by:
      getMemberNamesAsList in interface UserAccessor
      Parameters:
      group - to retrieve the member names from
      Returns:
      a list of Strings
    • getMembers

      public Iterable<ConfluenceUser> getMembers(com.atlassian.user.Group group)
      Description copied from interface: UserAccessor
      Returns users who are members of the specified group (either directly or as a member of a nested group). Returns an empty iterable if the group is null or the group doesn't exist.

      Elements are generated on demand and it is recommended to fetch only as many elements as are needed.

      Specified by:
      getMembers in interface UserAccessor
      Parameters:
      group - group to get members for
      Returns:
      users who are members of the specified group
    • getMembers

      public Iterable<ConfluenceUser> getMembers(com.atlassian.user.Group group, int limit)
      Description copied from interface: UserAccessor
      Returns users who are members of the specified group. This API will only return users upto the given limit (either directly or as a member of a nested group). Returns an empty iterable if the group is null or the group doesn't exist.

      Elements are generated on demand and it is recommended to fetch only as many elements as are needed.

      Specified by:
      getMembers in interface UserAccessor
      Parameters:
      group - group to get members for
      limit - maximum number of users to return
      Returns:
      users who are members of the specified group
    • getGroupNames

      public List<String> getGroupNames(com.atlassian.user.User user)
      Description copied from interface: UserAccessor
      Gets the list of group names representing the groups the passed in user is a member of.
      Specified by:
      getGroupNames in interface UserAccessor
      Parameters:
      user - the user to perform the membership check for
      Returns:
      a list of group names
    • getGroupNamesForUserName

      public List<String> getGroupNamesForUserName(String userName)
      Description copied from interface: UserAccessor
      Gets the list of group names representing the groups the passed in user is a member of.
      Specified by:
      getGroupNamesForUserName in interface UserAccessor
      Parameters:
      userName - the name of the user to perform the membership check for
      Returns:
      a list of group names
    • getWriteableGroups

      public List<com.atlassian.user.Group> getWriteableGroups()
      Description copied from interface: UserAccessor
      Gets all editable groups. That is, returns any groups that belong to read/write repositories. Groups in readonly repositories that are ReadOnly are not returned.
      Specified by:
      getWriteableGroups in interface UserAccessor
      Returns:
      list of Groups that can be edited.
    • getPropertySet

      public com.opensymphony.module.propertyset.PropertySet getPropertySet(com.atlassian.user.User user)
      Specified by:
      getPropertySet in interface UserAccessor
      Specified by:
      getPropertySet in interface UserAccessor
      See Also:
      • UserSettingsService
    • getPropertySet

      public com.opensymphony.module.propertyset.PropertySet getPropertySet(ConfluenceUser user)
      Specified by:
      getPropertySet in interface UserAccessor
      Returns:
      the property set for the supplied user
      See Also:
      • UserSettingsService
    • getUserNamesWithConfluenceAccess

      public List<String> getUserNamesWithConfluenceAccess()
      Description copied from interface: UserAccessor
      Returns the names of all users with access to use Confluence. If you only need to know the number of users, you should call UserChecker.getNumberOfRegisteredUsers(), as that caches its results.
      Specified by:
      getUserNamesWithConfluenceAccess in interface UserAccessor
      See Also:
    • countLicenseConsumingUsers

      public int countLicenseConsumingUsers()
      Description copied from interface: UserAccessor
      Returns the number of users which have access to use Confluence AND consume a Confluence license. Callers are strongly recommended to use the UserChecker.getNumberOfRegisteredUsers() to retrieve this info, as that caches its results.
      Specified by:
      countLicenseConsumingUsers in interface UserAccessor
      See Also:
    • findUsersAsList

      public List<com.atlassian.user.User> findUsersAsList(com.atlassian.user.search.query.Query<com.atlassian.user.User> search) throws com.atlassian.user.EntityException
      Specified by:
      findUsersAsList in interface UserAccessor
      Throws:
      com.atlassian.user.EntityException
    • setUserProfilePicture

      public void setUserProfilePicture(com.atlassian.user.User user, Attachment attachment)
      Description copied from interface: UserAccessor
      Set the user profile picture to the given attachment. The attachment should be an image attached to that user's personal information, of size 48x48. No check is performed in this method that the image is valid or the right size.
      Specified by:
      setUserProfilePicture in interface UserAccessor
      Parameters:
      user - the user to set a profile picture for
      attachment - the attachment containing the user's profile picture
    • setUserProfilePicture

      public void setUserProfilePicture(com.atlassian.user.User targetUser, String imagePath)
      Description copied from interface: UserAccessor
      Set the user profile picture to a built-in image. The path should be the web-application-root-relative path to the image to be used as the user's profile picture and should be size 48x48. Neither are checked by the implementation
      Specified by:
      setUserProfilePicture in interface UserAccessor
      Parameters:
      targetUser - the user to set a profile picture for
      imagePath - the image path to that picture.
    • getAllDefaultGroupNames

      public List<String> getAllDefaultGroupNames()
      Description copied from interface: UserAccessor
      Get the list of default group names.
      Specified by:
      getAllDefaultGroupNames in interface UserAccessor
      Returns:
      a list with the default group names.
    • getNewUserDefaultGroupName

      public String getNewUserDefaultGroupName()
      Description copied from interface: UserAccessor
      Get the name of the default group for a new user.
      Specified by:
      getNewUserDefaultGroupName in interface UserAccessor
      Returns:
      the default group for a new user.
    • renameUser

      public ConfluenceUser renameUser(ConfluenceUser user, String newUsername) throws com.atlassian.user.EntityException
      Description copied from interface: UserAccessor
      Updates the username of the given user.
      Specified by:
      renameUser in interface UserAccessor
      Parameters:
      user - user to rename
      newUsername - username to use for renaming
      Returns:
      renamed user
      Throws:
      com.atlassian.user.impl.EntityValidationException - if the new username does not meet the username requirements
      com.atlassian.user.EntityException - if the operation is not allowed for the user
      com.atlassian.user.impl.DuplicateEntityException - if the username is already taken
    • getUsersByUserKeys

      public List<ConfluenceUser> getUsersByUserKeys(List<com.atlassian.sal.api.user.UserKey> userKeys)
      Description copied from interface: UserAccessor
      Returns a list of ConfluenceUser with the supplied UserKeys or an empty list if the users do not exist. This method returns ConfluenceUser instances with pre-populated backing EmbeddedCrowdUser.
      Specified by:
      getUsersByUserKeys in interface ConfluenceUserResolver
      Specified by:
      getUsersByUserKeys in interface UserAccessor
      Parameters:
      userKeys - the user keys
      Returns:
      the list of ConfluenceUsers with UserKeys
    • getGroupsByGroupNames

      public List<com.atlassian.user.Group> getGroupsByGroupNames(List<String> groupNames)
      Description copied from interface: UserAccessor
      Returns a list of Group objects where the names match that of the provided list of group names. If no names are provided an empty list will be returned.
      Specified by:
      getGroupsByGroupNames in interface UserAccessor
      Parameters:
      groupNames - the list group names for which the matching Group objects must be returned
      Returns:
      the list of resolved groups
    • countUnsyncedUsers

      public int countUnsyncedUsers()
      Description copied from interface: UserAccessor
      Get a count of all unsynced users in Confluence. An unsynced user is a user that was managed in an external directory but has since been removed from the directory without being deleted in Confluence.
      Specified by:
      countUnsyncedUsers in interface UserAccessor
      Returns:
      the total number of all unsynced users.
    • isLicensedToAddMoreUsers

      public boolean isLicensedToAddMoreUsers()
      Specified by:
      isLicensedToAddMoreUsers in interface UserAccessor
      Specified by:
      isLicensedToAddMoreUsers in interface UserAccessor
    • isDeactivated

      public boolean isDeactivated(com.atlassian.user.User user)
      Description copied from interface: UserAccessor
      Returns true if the user exists and is unable to log in, otherwise false. Returns false if the user is null.
      Specified by:
      isDeactivated in interface UserAccessor
      Specified by:
      isDeactivated in interface UserAccessor
      Returns:
      true if the user exists and is unable to log in, otherwise false.
    • isDeactivated

      public boolean isDeactivated(String username)
      Description copied from interface: UserAccessor
      Returns true if the user with the specified username exists and is unable to log in, otherwise false. Returns false if the username is null.
      Specified by:
      isDeactivated in interface UserAccessor
      Specified by:
      isDeactivated in interface UserAccessor
      Returns:
      true if the user with the specified username exists and is unable to log in, otherwise false.
    • alterPassword

      public void alterPassword(com.atlassian.user.User user, String plainTextPassword, String token) throws com.atlassian.user.EntityException
      Specified by:
      alterPassword in interface UserAccessor
      Throws:
      com.atlassian.user.EntityException