com.atlassian.sal.api.user.UserManager |
Interface providing user based operations across various apps.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Given a usernamen & password, this method checks whether or not the provided user can
be authenticated
| |||||||||||
Returns the username of the currently logged in user or null if no user can be found.
| |||||||||||
Returns the username of the currently logged in user or null if no user can be found.
| |||||||||||
Returns a
UserProfile object for the specified user or null if no user can be found | |||||||||||
Returns
true or false depending on whether a user has been granted the administrator permission. | |||||||||||
Returns
true or false depending on whether a user has been granted the system administrator
permission. | |||||||||||
Returns whether the user is in the specify group
| |||||||||||
Returns the user that made this request or
null if this application does not have such a user. |
Given a usernamen & password, this method checks whether or not the provided user can be authenticated
username | Username of the user |
---|---|
password | Password of the user |
true
if the user can be authenticated, false
otherwise
Returns the username of the currently logged in user or null if no user can be found. If possible, please use
getRemoteUsername(HttpServletRequest)
.
Returns the username of the currently logged in user or null if no user can be found.
request | The request to retrieve the username from |
---|
Returns a UserProfile object
for the specified user or null if no user can be found
username | The username of the user whose profile is requested |
---|
Returns true
or false
depending on whether a user has been granted the administrator permission.
An administrator may have restricted administrative permissions that only apply to application-level
configuration that cannot affect the underlying operating system. Only check for administrator permission when
performing this type of operation. Operations that can affect security, the filesystem, or allow arbitrary code
execution must check isSystemAdmin(String)
instead.
userManager.isSystemAdmin(username)
returns true
will also return true
for
userManager.isAdmin(username)
.username | The username of the user to check |
---|
true
or false
depending on whether the user has been granted the admin permissionReturns true
or false
depending on whether a user has been granted the system administrator
permission. A system administrator has full administrative permissions in the application, including permission
to perform operations that may affect the underlying operating system, such as specifying filesystem paths,
installing plugins, configuring mail servers and logging, performing backups and restores, etc. Only check for
system administrator when performing this type of operation. Operations that do not affect the underlying system
should use isAdmin(String)
instead.
username | The username of the user to check |
---|
true
or false
depending on whether a user has been granted the system admin permission.Returns whether the user is in the specify group
username | The username to check |
---|---|
group | The group to check |
true
if the user is in the specified group
Returns the user that made this request or null
if this application does not have such a user.
username | Username of the user a consumer is making a request on behalf of |
---|
Principal
corresponding to the username, null
if the user does not existUserResolutionException | thrown if there is a problem resolving the user, such as a failure when accessing an external user store |
---|