Package sonia.scm.user
Interface UserManager
- All Superinterfaces:
AutoCloseable
,Closeable
,HandlerBase<User>
,Initable
,LastModifiedAware
,Manager<User>
,Searchable<User>
- All Known Implementing Classes:
AbstractUserManager
,UserManagerDecorator
The central class for managing
User
objects.
This class is a singleton and is available via injection.-
Method Summary
Modifier and TypeMethodDescriptionvoid
changePasswordForLoggedInUser
(String oldPassword, String newPassword) Changes the password of the logged in user.boolean
Returns true if a user with the specified username exists.Returns the default type for users.default boolean
isTypeDefault
(User user) void
overwritePassword
(String userId, String newPassword) Overwrites the password for the given user id.Methods inherited from interface sonia.scm.HandlerBase
create, delete, modify
Methods inherited from interface sonia.scm.LastModifiedAware
getLastModified
Methods inherited from interface sonia.scm.Manager
get, getAll, getAll, getAll, getAll, getAll, getPage, refresh
Methods inherited from interface sonia.scm.search.Searchable
search
-
Method Details
-
contains
Returns true if a user with the specified username exists. -
getDefaultType
String getDefaultType()Returns the default type for users.- Since:
- 1.14
-
isTypeDefault
-
changePasswordForLoggedInUser
Changes the password of the logged in user.- Parameters:
oldPassword
- The current encrypted password of the user.newPassword
- The new encrypted password of the user.
-
overwritePassword
Overwrites the password for the given user id. This needs user write privileges.- Parameters:
userId
- The id of the user to change the password for.newPassword
- The new encrypted password.
-