Package com.atlassian.bitbucket.user
Interface DetailedUser
- All Superinterfaces:
ApplicationUser
,Person
,Principal
,PropertySupport
Extends a
ApplicationUser
with additional details relating to the directory backing the user.-
Field Summary
Fields inherited from interface com.atlassian.bitbucket.user.ApplicationUser
MAX_SLUG_LENGTH, SLUG_REGEXP
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the name of the underlying directory in which this user is stored.Retrieves the timestamp for the user's most recent authentication.boolean
Retrieves a flag indicating whether the directory in which this user is stored supports deleting the user.boolean
Retrieves a flag indicating whether the directory in which this user is stored supports updating the user's details, such asdisplay name
ande-mail address
.boolean
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.Methods inherited from interface com.atlassian.bitbucket.user.ApplicationUser
accept, getDisplayName, getId, getSlug, getType, isActive
Methods inherited from interface com.atlassian.bitbucket.user.Person
getEmailAddress, getName
Methods inherited from interface java.security.Principal
equals, getName, hashCode, implies, toString
Methods inherited from interface com.atlassian.bitbucket.property.PropertySupport
getProperties
-
Method Details
-
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
-
getLastAuthenticationTimestamp
Retrieves the timestamp for the user's most recent authentication. This timestamp may benull
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
AuthenticationSuccessEvent
s for successful attempts, they will be included in this tracking.- Returns:
- the user's most recent authentication, or
null
-
isDeletable
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
-
isMutableDetails
boolean isMutableDetails()Retrieves a flag indicating whether the directory in which this user is stored supports updating the user's details, such asdisplay name
ande-mail address
.- Returns:
true
if the underlying directory supports changing details; otherwise,false
-
isMutableGroups
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
-