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 TypeMethodDescriptionvoidchangePasswordForLoggedInUser(String oldPassword, String newPassword) Changes the password of the logged in user.booleanReturns true if a user with the specified username exists.Returns the default type for users.default booleanisTypeDefault(User user) voidoverwritePassword(String userId, String newPassword) Overwrites the password for the given user id.Methods inherited from interface sonia.scm.HandlerBase
create, delete, modifyMethods inherited from interface sonia.scm.LastModifiedAware
getLastModifiedMethods inherited from interface sonia.scm.Manager
get, getAll, getAll, getAll, getAll, getAll, getPage, refreshMethods 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.
-