Package jetbrains.buildServer.users.impl
Interface UserEx
-
- All Superinterfaces:
AuthorityHolder
,Loggable
,NotificationRulesHolder
,PropertyHolder
,RolesHolder
,SPropertyHolder
,SUser
,User
,UserRolesInit
- All Known Implementing Classes:
AssociatedUser
,BaseUser
,InMemoryUser
,RestrictedUserImpl
,SecuredUser
,TestUser
,UserImpl
public interface UserEx extends SUser, UserRolesInit, SPropertyHolder
- Author:
- Sergey.Anchipolevsky Date: 20.09.2007
-
-
Field Summary
-
Fields inherited from interface jetbrains.buildServer.users.SUser
GUEST_USER_ID, SUPER_USER_ID, UKNOWN_USER_ID
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
addVcsUsername(VcsUsernamePropertyKey key, String userName)
void
deleteAttribute(String attributeKey)
Delete user attributeString
getAttribute(String attributeKey)
Get user attributeMap<String,String>
getAttributes()
Get all user attributesSortedMap<SProject,List<SBuildType>>
getFilteredVisibleBuildTypes(BuildTypeFilter filter)
Returns sorted map of build configurations per project.AuthorityHolder
getOriginalAuthorityHolder()
The same asSecurityContextEx.getOriginalAuthority()
ProjectVisibilityHolder
getProjectVisibilityHolder()
Map<VcsUsernamePropertyKey,List<String>>
getVcsUsernames()
String
getVerifiedEmail()
Returns null if user doesn't have email specified or his email is not verified.boolean
hasPassword()
Returns true if user has password, false otherwise (e.g.void
init(String username, String name, String email, Long lastLogin, boolean hasPassword)
boolean
isConfiguredVisibleProjects()
Returns whether the user has configured visible projects.boolean
isHasHiddenProjects()
Returns whether the user has any hidden (i.e.boolean
isPseudoUser()
void
resetBlocks()
Reset cached blocksvoid
resetBuildTypesOrder(SProject project)
Resets the build types order settings to defaults.void
resetCachedAttributes()
Reset cached user attributesvoid
resetCachedProperties()
Reset cached blocksvoid
resetCachedVcsUsernames()
Reset cached blocksdefault void
runWithRestrictor(AuthorityHolderRestrictor restrictor, SecurityContextEx.RunAsAction action)
<T> T
runWithRestrictor(AuthorityHolderRestrictor restrictor, SecurityContextEx.RunAsActionWithResult<T> action)
void
setAttribute(String attributeKey, String attributeValue)
Set user attributevoid
setCreationInProgress(boolean inProgress)
void
setDefaultVcsUsernames(List<String> userNames)
boolean
setEmailIsVerified(String email)
Mark user`s email as verified if it's equal to email passed in parameter.void
setVcsRootUsernames(VcsRoot root, List<String> userNames)
void
setVcsUsernames(String vcsName, List<String> userNames)
void
setVcsUsernames(VcsUsernamePropertyKey key, List<String> userNames)
void
updatePermissions()
Forces this user to recompute its permissions.-
Methods inherited from interface jetbrains.buildServer.serverSide.auth.AuthorityHolder
getAllPermissions, getAssociatedUser, getGlobalPermissions, getPermissionsGrantedForAllProjects, getPermissionsGrantedForAnyOfProjects, getPermissionsGrantedForProject, getProjectsPermissions, hasAllPermissionsOf, isPermissionGrantedForAllProjects, isPermissionGrantedForAnyOfProjects, isPermissionGrantedForAnyProject, isPermissionGrantedForProject, isPermissionGrantedGlobally
-
Methods inherited from interface jetbrains.buildServer.notification.NotificationRulesHolder
addNewRule, applyOrder, findConflictingRules, findRuleById, getAllParentRulesHolders, getNotificationRules, getParentRulesHolders, removeRule, removeRule, setNotificationRules
-
Methods inherited from interface jetbrains.buildServer.users.PropertyHolder
getBooleanProperty, getProperties, getPropertyValue
-
Methods inherited from interface jetbrains.buildServer.serverSide.auth.RolesHolder
addRole, getAllParentHolders, getParentHolders, getRoles, getRolesWithScope, getScopes, isSystemAdministratorRoleGranted, isSystemAdministratorRoleGrantedDirectly, isSystemAdministratorRoleInherited, removeRole, removeRole, removeRoles
-
Methods inherited from interface jetbrains.buildServer.users.SPropertyHolder
deleteProperty, setProperties, setProperty
-
Methods inherited from interface jetbrains.buildServer.users.SUser
deleteUserProperty, getAllModifications, getAllUserGroups, getBlockState, getBuildTypesOrder, getOrderedBuildTypes, getProjectsOrder, getUserGroups, getVcsModifications, getVcsUsernameProperties, hideProject, hideProjects, isGuest, isHighlightRelatedDataInUI, setBlockState, setBuildTypesOrder, setLastLoginTimestamp, setPassword, setProjectsOrder, setUserProperties, setUserProperty, setVisibleProjects, updateUserAccount
-
Methods inherited from interface jetbrains.buildServer.users.User
getAllProjects, getDescriptiveName, getEmail, getExtendedName, getId, getLastLoginTimestamp, getName, getRealm, getUsername, getVisibleProjects
-
Methods inherited from interface jetbrains.buildServer.users.impl.UserRolesInit
resetRoles
-
-
-
-
Method Detail
-
updatePermissions
void updatePermissions()
Forces this user to recompute its permissions.
-
getOriginalAuthorityHolder
@NotNull AuthorityHolder getOriginalAuthorityHolder()
The same asSecurityContextEx.getOriginalAuthority()
-
isHasHiddenProjects
boolean isHasHiddenProjects()
Returns whether the user has any hidden (i.e. configured to be not-visible) projects.- Returns:
- true if the user has any hidden projects
-
isConfiguredVisibleProjects
boolean isConfiguredVisibleProjects()
Returns whether the user has configured visible projects.- Returns:
- true if the user has configured visible projects
-
getFilteredVisibleBuildTypes
@NotNull SortedMap<SProject,List<SBuildType>> getFilteredVisibleBuildTypes(@Nullable BuildTypeFilter filter)
Returns sorted map of build configurations per project. The build configurations are sorted according to user settings.- Parameters:
filter
- filter of build configurations, can be null- Returns:
- sorted map of build types per project
- Since:
- 5.1
-
resetBuildTypesOrder
void resetBuildTypesOrder(@NotNull SProject project)
Resets the build types order settings to defaults.- Parameters:
project
- the project- Since:
- 6.0
-
hasPassword
boolean hasPassword()
Returns true if user has password, false otherwise (e.g. if it was created by NT domain or LDAP login module)- Returns:
-
isPseudoUser
boolean isPseudoUser()
-
setEmailIsVerified
boolean setEmailIsVerified(@NotNull String email)
Mark user`s email as verified if it's equal to email passed in parameter.- Returns:
- true if verified email was set, false otherwise
-
getVerifiedEmail
@Nullable String getVerifiedEmail()
Returns null if user doesn't have email specified or his email is not verified.
-
getVcsUsernames
@NotNull Map<VcsUsernamePropertyKey,List<String>> getVcsUsernames()
-
setDefaultVcsUsernames
void setDefaultVcsUsernames(@NotNull List<String> userNames) throws InvalidVcsNameException
- Throws:
InvalidVcsNameException
-
setVcsUsernames
void setVcsUsernames(@NotNull String vcsName, @NotNull List<String> userNames) throws InvalidVcsNameException
- Throws:
InvalidVcsNameException
-
setVcsRootUsernames
void setVcsRootUsernames(@NotNull VcsRoot root, @NotNull List<String> userNames) throws InvalidVcsNameException
- Throws:
InvalidVcsNameException
-
setVcsUsernames
void setVcsUsernames(@NotNull VcsUsernamePropertyKey key, @NotNull List<String> userNames) throws InvalidVcsNameException
- Throws:
InvalidVcsNameException
-
addVcsUsername
void addVcsUsername(@NotNull VcsUsernamePropertyKey key, @NotNull String userName) throws InvalidVcsNameException
- Throws:
InvalidVcsNameException
-
getProjectVisibilityHolder
ProjectVisibilityHolder getProjectVisibilityHolder()
-
setCreationInProgress
void setCreationInProgress(boolean inProgress)
-
init
void init(@NotNull String username, String name, String email, Long lastLogin, boolean hasPassword)
-
resetBlocks
void resetBlocks()
Reset cached blocks
-
resetCachedProperties
void resetCachedProperties()
Reset cached blocks
-
resetCachedVcsUsernames
void resetCachedVcsUsernames()
Reset cached blocks
-
setAttribute
void setAttribute(@NotNull String attributeKey, @NotNull String attributeValue)
Set user attribute
-
getAttribute
@Nullable String getAttribute(@NotNull String attributeKey)
Get user attribute- Returns:
- user attribute or null if there is no attribute with such key
-
getAttributes
@NotNull Map<String,String> getAttributes()
Get all user attributes- Returns:
- user attributes or an empty map
-
deleteAttribute
void deleteAttribute(@NotNull String attributeKey)
Delete user attribute
-
resetCachedAttributes
void resetCachedAttributes()
Reset cached user attributes
-
runWithRestrictor
<T> T runWithRestrictor(@NotNull AuthorityHolderRestrictor restrictor, @NotNull SecurityContextEx.RunAsActionWithResult<T> action)
-
runWithRestrictor
default void runWithRestrictor(@NotNull AuthorityHolderRestrictor restrictor, @NotNull SecurityContextEx.RunAsAction action)
-
-