Merge branch 'release-3.2' into 'master'
Этот коммит содержится в:
14
api/user.go
14
api/user.go
@@ -455,8 +455,8 @@ func login(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
if result := <-Srv.Store.User().Get(id); result.Err != nil {
|
||||
c.LogAuditWithUserId(user.Id, "failure")
|
||||
//c.Err = model.NewLocAppError("login", "api.user.login.invalid_credentials", nil, result.Err.Error())
|
||||
c.Err = model.NewLocAppError("login", "api.user.login.invalid_credentials", nil, "")
|
||||
c.Err = result.Err
|
||||
c.Err.StatusCode = http.StatusBadRequest
|
||||
return
|
||||
} else {
|
||||
user = result.Data.(*model.User)
|
||||
@@ -466,8 +466,7 @@ func login(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
if user, err = getUserForLogin(loginId, ldapOnly); err != nil {
|
||||
c.LogAudit("failure")
|
||||
//c.Err = model.NewLocAppError("login", "api.user.login.invalid_credentials", nil, err.Error())
|
||||
c.Err = model.NewLocAppError("login", "api.user.login.invalid_credentials", nil, "")
|
||||
c.Err = err
|
||||
return
|
||||
}
|
||||
|
||||
@@ -477,12 +476,7 @@ func login(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
// and then authenticate them
|
||||
if user, err = authenticateUser(user, password, mfaToken); err != nil {
|
||||
c.LogAuditWithUserId(user.Id, "failure")
|
||||
//c.Err = model.NewLocAppError("login", "api.user.login.invalid_credentials", nil, err.Error())
|
||||
if err.Id == "api.user.login.not_verified.app_error" {
|
||||
c.Err = err
|
||||
} else {
|
||||
c.Err = model.NewLocAppError("login", "api.user.login.invalid_credentials", nil, "")
|
||||
}
|
||||
c.Err = err
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user