Fix update user auth. (#10013)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
8429add371
Коммит
ef4e37fb6b
@@ -856,6 +856,7 @@ func updateUserAuth(c *Context, w http.ResponseWriter, r *http.Request) {
|
|||||||
user, err := c.App.UpdateUserAuth(c.Params.UserId, userAuth)
|
user, err := c.App.UpdateUserAuth(c.Params.UserId, userAuth)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.Err = err
|
c.Err = err
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
c.LogAuditWithUserId(c.Params.UserId, fmt.Sprintf("updated user auth to service=%v", user.AuthService))
|
c.LogAuditWithUserId(c.Params.UserId, fmt.Sprintf("updated user auth to service=%v", user.AuthService))
|
||||||
|
|||||||
@@ -1203,7 +1203,7 @@ func TestUpdateUserAuth(t *testing.T) {
|
|||||||
userAuth.AuthData = user.AuthData
|
userAuth.AuthData = user.AuthData
|
||||||
userAuth.AuthService = ""
|
userAuth.AuthService = ""
|
||||||
userAuth.Password = "1"
|
userAuth.Password = "1"
|
||||||
if _, err := th.Client.UpdateUserAuth(user.Id, userAuth); err == nil {
|
if _, err := Client.UpdateUserAuth(user.Id, userAuth); err == nil {
|
||||||
t.Fatal("Should have errored - user password not valid")
|
t.Fatal("Should have errored - user password not valid")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user