Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix update user auth. #10013

Merged
merged 1 commit into from Dec 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions api4/user.go
Expand Up @@ -856,6 +856,7 @@ func updateUserAuth(c *Context, w http.ResponseWriter, r *http.Request) {
user, err := c.App.UpdateUserAuth(c.Params.UserId, userAuth)
if err != nil {
c.Err = err
return
}

c.LogAuditWithUserId(c.Params.UserId, fmt.Sprintf("updated user auth to service=%v", user.AuthService))
Expand Down
2 changes: 1 addition & 1 deletion api4/user_test.go
Expand Up @@ -1203,7 +1203,7 @@ func TestUpdateUserAuth(t *testing.T) {
userAuth.AuthData = user.AuthData
userAuth.AuthService = ""
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")
}

Expand Down