comparison pkg/controllers/user.go @ 5554:79155213c4da

Log if the modification of the user includes an reactivation request.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 18 Nov 2021 16:54:07 +0100
parents 0717168c1978
children 6270951dda28
comparison
equal deleted inserted replaced
5553:0717168c1978 5554:79155213c4da
413 if patch.User != nil && *patch.User != user { 413 if patch.User != nil && *patch.User != user {
414 // Running in a go routine should not be necessary. 414 // Running in a go routine should not be necessary.
415 go func() { auth.Sessions.Logout(string(user)) }() 415 go func() { auth.Sessions.Logout(string(user)) }()
416 } 416 }
417 417
418 log.Infof("User '%s' modified.\n", user) 418 // Log if the user should be reactivated, even if he is already active.
419 var reactivated string
420 if patch.Active != nil && *patch.Active && priv {
421 reactivated = " (reactivation requested)"
422 }
423
424 log.Infof("User '%s' modified%s.\n", user, reactivated)
419 425
420 jr = mw.JSONResult{ 426 jr = mw.JSONResult{
421 Code: http.StatusCreated, 427 Code: http.StatusCreated,
422 Result: struct { 428 Result: struct {
423 Result string `json:"result"` 429 Result string `json:"result"`