Adapt ChangePasswordNotAllowedException and mapper

This commit is contained in:
René Pfeuffer
2018-10-29 09:26:23 +01:00
parent 007baecc86
commit 4425243f03
3 changed files with 20 additions and 12 deletions

View File

@@ -422,7 +422,7 @@ public class DefaultUserManager extends AbstractUserManager
throw new NotFoundException(User.class, userId);
}
if (!isTypeDefault(user)) {
throw new ChangePasswordNotAllowedException(user.getType());
throw new ChangePasswordNotAllowedException(ContextEntry.ContextBuilder.entity("passwordChange", "-").in(User.class, user.getName()));
}
user.setPassword(newPassword);
this.modify(user);