[GH-21566] Add request context and logger to all public methods in server/channels/app/authentication.go (#25270)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
dd46afacd6
Коммит
a6ba7163c8
@@ -1297,7 +1297,7 @@ func updateUser(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// If eMail update is attempted by the currently logged in user, check if correct password was provided
|
||||
if user.Email != "" && ouser.Email != user.Email && c.AppContext.Session().UserId == c.Params.UserId {
|
||||
err = c.App.DoubleCheckPassword(ouser, user.Password)
|
||||
err = c.App.DoubleCheckPassword(c.AppContext, ouser, user.Password)
|
||||
if err != nil {
|
||||
c.SetInvalidParam("password")
|
||||
return
|
||||
@@ -1378,7 +1378,7 @@ func patchUser(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
if err = c.App.DoubleCheckPassword(ouser, *patch.Password); err != nil {
|
||||
if err = c.App.DoubleCheckPassword(c.AppContext, ouser, *patch.Password); err != nil {
|
||||
c.Err = err
|
||||
return
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user