From 9cf421510318c394c05fe012eaf0a1c3dbfed36b Mon Sep 17 00:00:00 2001 From: Florian M Date: Mon, 6 Mar 2023 11:22:04 +0100 Subject: [PATCH] Logging on password reset/change (#6901) --- app/controllers/AuthenticationController.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/AuthenticationController.scala b/app/controllers/AuthenticationController.scala index 799be7e828..3b3aafbbc6 100755 --- a/app/controllers/AuthenticationController.scala +++ b/app/controllers/AuthenticationController.scala @@ -394,6 +394,7 @@ class AuthenticationController @Inject()( bearerTokenAuthenticatorService.userForToken(passwords.token.trim).futureBox.flatMap { case Full(user) => for { + - <- Fox.successful(logger.info(s"Multiuser ${user._multiUser} reset their password.")) _ <- multiUserDAO.updatePasswordInfo(user._multiUser, passwordHasher.hash(passwords.password1))( GlobalAccessContext) _ <- bearerTokenAuthenticatorService.remove(passwords.token.trim) @@ -420,6 +421,7 @@ class AuthenticationController @Inject()( Future.successful(NotFound(Messages("error.noUser"))) case Some(user) => for { + - <- Fox.successful(logger.info(s"Multiuser ${user._multiUser} changed their password.")) _ <- multiUserDAO.updatePasswordInfo(user._multiUser, passwordHasher.hash(passwords.password1)) _ <- combinedAuthenticatorService.discard(request.authenticator, Ok) userEmail <- userService.emailFor(user)