Package com.atlassian.bamboo.user
Class DefaultBambooUser
- java.lang.Object
-
- com.atlassian.bamboo.user.DefaultBambooUser
-
- All Implemented Interfaces:
BambooUser,com.atlassian.user.Entity,com.atlassian.user.User,Serializable,Principal,org.acegisecurity.userdetails.UserDetails
public class DefaultBambooUser extends Object implements BambooUser
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_ADMIN_GROUPThe name of the default admin group in Bamboo that's created on setup.static StringDEFAULT_USERS_GROUP-
Fields inherited from interface com.atlassian.bamboo.user.BambooUser
BOTH_PREF, DEFAULT_NOTIFICATION_PREFERENCE, DEFAULT_TRANSPORT_PREFERENCE, EMAIL_PREF, IM_PREF, MULTIPART_EMAIL, NONE_PREF, TEXT_EMAIL
-
-
Constructor Summary
Constructors Constructor Description DefaultBambooUser(@NotNull com.atlassian.user.User user, @NotNull Supplier<org.acegisecurity.GrantedAuthority[]> authoritiesSupplier)DefaultBambooUser(@NotNull com.atlassian.user.User user, @NotNull Supplier<org.acegisecurity.GrantedAuthority[]> authoritiesSupplier, @Nullable AccessToken accessToken)DefaultBambooUser(com.atlassian.user.User user)Deprecated.since 6.6.0.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)@Nullable AccessTokengetAccessToken()If user has been authenticated by access token returns meta-data of token.@NotNull org.acegisecurity.GrantedAuthority[]getAuthorities()StringgetEmail()StringgetFullName()@Nullable StringgetJabberAddress()Returns the user's jabber address for IMsStringgetName()StringgetNotificationPreference()Returns the user's preferences for how they receive notificationsStringgetNotificationTransportPreference()Returns the user's preference for the format of emailsStringgetPassword()com.atlassian.user.UsergetUser()Returns the user, which contains the user's detailsStringgetUsername()inthashCode()booleanisAccountNonExpired()booleanisAccountNonLocked()booleanisCredentialsNonExpired()booleanisEnabled()StringtoString()
-
-
-
Field Detail
-
DEFAULT_USERS_GROUP
public static final String DEFAULT_USERS_GROUP
- See Also:
- Constant Field Values
-
DEFAULT_ADMIN_GROUP
public static final String DEFAULT_ADMIN_GROUP
The name of the default admin group in Bamboo that's created on setup. This should NOT be used to check permissions, as the users can configure other groups to be admin, and using it will introduce security vulnerabilities. If a list of admin groups is needed, useBambooPermissionManager.getAdminGroups().- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultBambooUser
@Deprecated public DefaultBambooUser(com.atlassian.user.User user)
Deprecated.since 6.6.0. UseDefaultBambooUser(User, GrantedAuthority[])
-
DefaultBambooUser
public DefaultBambooUser(@NotNull @NotNull com.atlassian.user.User user, @NotNull @NotNull Supplier<org.acegisecurity.GrantedAuthority[]> authoritiesSupplier)
-
DefaultBambooUser
public DefaultBambooUser(@NotNull @NotNull com.atlassian.user.User user, @NotNull @NotNull Supplier<org.acegisecurity.GrantedAuthority[]> authoritiesSupplier, @Nullable @Nullable AccessToken accessToken)
-
-
Method Detail
-
getJabberAddress
@Nullable public @Nullable String getJabberAddress()
Description copied from interface:BambooUserReturns the user's jabber address for IMs- Specified by:
getJabberAddressin interfaceBambooUser- Returns:
- jabber address.
-
getNotificationPreference
public String getNotificationPreference()
Description copied from interface:BambooUserReturns the user's preferences for how they receive notifications- Specified by:
getNotificationPreferencein interfaceBambooUser- Returns:
- notification preference.
-
getNotificationTransportPreference
public String getNotificationTransportPreference()
Description copied from interface:BambooUserReturns the user's preference for the format of emails- Specified by:
getNotificationTransportPreferencein interfaceBambooUser- Returns:
- notification transport preference.
-
getUser
public com.atlassian.user.User getUser()
Description copied from interface:BambooUserReturns the user, which contains the user's details- Specified by:
getUserin interfaceBambooUser- Returns:
- user.
-
getName
public String getName()
-
getFullName
public String getFullName()
- Specified by:
getFullNamein interfacecom.atlassian.user.User
-
getEmail
public String getEmail()
- Specified by:
getEmailin interfacecom.atlassian.user.User
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object o)
-
getAuthorities
@NotNull public @NotNull org.acegisecurity.GrantedAuthority[] getAuthorities()
- Specified by:
getAuthoritiesin interfaceorg.acegisecurity.userdetails.UserDetails
-
getPassword
public String getPassword()
- Specified by:
getPasswordin interfaceorg.acegisecurity.userdetails.UserDetails
-
getUsername
public String getUsername()
- Specified by:
getUsernamein interfaceorg.acegisecurity.userdetails.UserDetails
-
isAccountNonExpired
public boolean isAccountNonExpired()
- Specified by:
isAccountNonExpiredin interfaceorg.acegisecurity.userdetails.UserDetails
-
isAccountNonLocked
public boolean isAccountNonLocked()
- Specified by:
isAccountNonLockedin interfaceorg.acegisecurity.userdetails.UserDetails
-
isCredentialsNonExpired
public boolean isCredentialsNonExpired()
- Specified by:
isCredentialsNonExpiredin interfaceorg.acegisecurity.userdetails.UserDetails
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfacecom.atlassian.user.User- Specified by:
isEnabledin interfaceorg.acegisecurity.userdetails.UserDetails
-
getAccessToken
@Nullable public @Nullable AccessToken getAccessToken()
Description copied from interface:BambooUserIf user has been authenticated by access token returns meta-data of token. Otherwise null.- Specified by:
getAccessTokenin interfaceBambooUser- Returns:
- access token
-
-