public interface

DetailedUser

implements ApplicationUser
com.atlassian.bitbucket.user.DetailedUser

Class Overview

Extends a ApplicationUser with additional details relating to the directory backing the user.

Summary

[Expand]
Inherited Constants
From interface com.atlassian.bitbucket.user.ApplicationUser
Public Methods
@Nullable String getDirectoryName()
Retrieves the name of the underlying directory in which this user is stored.
@Nullable Date getLastAuthenticationTimestamp()
Retrieves the timestamp for the user's most recent authentication.
boolean isDeletable()
Retrieves a flag indicating whether the directory in which this user is stored supports deleting the user.
boolean isMutableDetails()
Retrieves a flag indicating whether the directory in which this user is stored supports updating the user's details, such as display name and e-mail address.
boolean isMutableGroups()
Retrieves a flag indicating whether the directory in which this user is stored supports modifying the user's groups, either to add new groups or remove existing ones.
[Expand]
Inherited Methods
From interface com.atlassian.bitbucket.user.ApplicationUser
From interface com.atlassian.bitbucket.user.Person
From interface java.security.Principal

Public Methods

@Nullable public String getDirectoryName ()

Retrieves the name of the underlying directory in which this user is stored.

In certain circumstances, it may not be possible to determine the directory name. However, while this property is Nullable, it will generally be available.

Returns
  • the directory name

@Nullable public Date getLastAuthenticationTimestamp ()

Retrieves the timestamp for the user's most recent authentication. This timestamp may be null if:

  • The user has never authenticated
  • The user's most recent authentication was before this timestamp was added

The exact avenues for "authenticating" vary. The base system, without any custom plugins, tracks authentication for the following:

  • HTTP authentication via REST or the web UI
  • SSH authentication for SCM hosting and other operations
  • Authentication via Trusted Apps
Plugins can add their own authentication paths. If they raise AuthenticationSuccessEvents for successful attempts, they will be included in this tracking.

Returns
  • the user's most recent authentication, or null

public boolean isDeletable ()

Retrieves a flag indicating whether the directory in which this user is stored supports deleting the user.

Returns
  • true if the underlying directory supports deleting users; otherwise, false

public boolean isMutableDetails ()

Retrieves a flag indicating whether the directory in which this user is stored supports updating the user's details, such as display name and e-mail address.

Returns
  • true if the underlying directory supports changing details; otherwise, false

public boolean isMutableGroups ()

Retrieves a flag indicating whether the directory in which this user is stored supports modifying the user's groups, either to add new groups or remove existing ones.

Returns
  • true if the underlying directory supports changing groups; otherwise, false