Class ConfluenceUserManager

  • All Implemented Interfaces:
    com.atlassian.sal.api.user.UserManager

    public class ConfluenceUserManager
    extends Object
    implements com.atlassian.sal.api.user.UserManager
    Authenticates a user against UserAccessor in Confluence.
    • Method Detail

      • getRemoteUsername

        public String getRemoteUsername()
        Specified by:
        getRemoteUsername in interface com.atlassian.sal.api.user.UserManager
      • getRemoteUser

        public @Nullable com.atlassian.sal.api.user.UserProfile getRemoteUser()
        Specified by:
        getRemoteUser in interface com.atlassian.sal.api.user.UserManager
        Since:
        5.2
      • getRemoteUserKey

        public @Nullable com.atlassian.sal.api.user.UserKey getRemoteUserKey()
        Specified by:
        getRemoteUserKey in interface com.atlassian.sal.api.user.UserManager
        Since:
        5.2
      • isSystemAdmin

        public boolean isSystemAdmin​(String username)
        Specified by:
        isSystemAdmin in interface com.atlassian.sal.api.user.UserManager
      • isSystemAdmin

        public boolean isSystemAdmin​(@Nullable com.atlassian.sal.api.user.UserKey userKey)
        Specified by:
        isSystemAdmin in interface com.atlassian.sal.api.user.UserManager
        Since:
        5.2
      • authenticate

        public boolean authenticate​(String username,
                                    String password)
        Specified by:
        authenticate in interface com.atlassian.sal.api.user.UserManager
      • isUserInGroup

        public boolean isUserInGroup​(String username,
                                     String group)
        Returns whether the user is in the specify group
        Specified by:
        isUserInGroup in interface com.atlassian.sal.api.user.UserManager
        Parameters:
        username - The username to check
        group - The group to check
        Returns:
        True if the user is in the specified group
      • isUserInGroup

        public boolean isUserInGroup​(@Nullable com.atlassian.sal.api.user.UserKey userKey,
                                     @Nullable String groupName)
        Specified by:
        isUserInGroup in interface com.atlassian.sal.api.user.UserManager
        Since:
        5.2
      • getRemoteUsername

        public String getRemoteUsername​(javax.servlet.http.HttpServletRequest request)
        Specified by:
        getRemoteUsername in interface com.atlassian.sal.api.user.UserManager
      • getRemoteUser

        public @Nullable com.atlassian.sal.api.user.UserProfile getRemoteUser​(javax.servlet.http.HttpServletRequest request)
        Specified by:
        getRemoteUser in interface com.atlassian.sal.api.user.UserManager
        Since:
        5.2
      • getRemoteUserKey

        public @Nullable com.atlassian.sal.api.user.UserKey getRemoteUserKey​(javax.servlet.http.HttpServletRequest request)
        Specified by:
        getRemoteUserKey in interface com.atlassian.sal.api.user.UserManager
        Since:
        5.2
      • resolve

        public ConfluenceUser resolve​(String username)
        Specified by:
        resolve in interface com.atlassian.sal.api.user.UserManager
      • findGroupNamesByPrefix

        public Iterable<String> findGroupNamesByPrefix​(String prefix,
                                                       int startIndex,
                                                       int maxResults)
        Specified by:
        findGroupNamesByPrefix in interface com.atlassian.sal.api.user.UserManager
      • isAnonymousAccessEnabled

        public boolean isAnonymousAccessEnabled()
        Specified by:
        isAnonymousAccessEnabled in interface com.atlassian.sal.api.user.UserManager
      • isLimitedUnlicensedAccessEnabled

        public boolean isLimitedUnlicensedAccessEnabled()
        Specified by:
        isLimitedUnlicensedAccessEnabled in interface com.atlassian.sal.api.user.UserManager
      • isAdmin

        public boolean isAdmin​(String username)
        Specified by:
        isAdmin in interface com.atlassian.sal.api.user.UserManager
      • isAdmin

        public boolean isAdmin​(@Nullable com.atlassian.sal.api.user.UserKey userKey)
        Specified by:
        isAdmin in interface com.atlassian.sal.api.user.UserManager
        Since:
        5.2
      • isLicensed

        public boolean isLicensed​(@Nullable com.atlassian.sal.api.user.UserKey userKey)
        Specified by:
        isLicensed in interface com.atlassian.sal.api.user.UserManager
      • isLimitedUnlicensedUser

        public boolean isLimitedUnlicensedUser​(@Nullable com.atlassian.sal.api.user.UserKey userKey)
        Specified by:
        isLimitedUnlicensedUser in interface com.atlassian.sal.api.user.UserManager
      • getUserProfile

        public com.atlassian.sal.api.user.UserProfile getUserProfile​(String username)
        Specified by:
        getUserProfile in interface com.atlassian.sal.api.user.UserManager
      • getUserProfile

        public @Nullable com.atlassian.sal.api.user.UserProfile getUserProfile​(@Nullable com.atlassian.sal.api.user.UserKey userKey)
        Specified by:
        getUserProfile in interface com.atlassian.sal.api.user.UserManager
        Since:
        5.2