revert to status found for login cws (#19625)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7b3a7fe346
Коммит
02818bfe7c
@@ -1938,7 +1938,7 @@ func loginCWS(c *Context, w http.ResponseWriter, r *http.Request) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
c.LogAuditWithUserId("", "failure - login_id="+loginID)
|
c.LogAuditWithUserId("", "failure - login_id="+loginID)
|
||||||
c.LogErrorByCode(err)
|
c.LogErrorByCode(err)
|
||||||
http.Redirect(w, r, *c.App.Config().ServiceSettings.SiteURL, http.StatusNotFound)
|
http.Redirect(w, r, *c.App.Config().ServiceSettings.SiteURL, http.StatusFound)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
auditRec.AddMeta("user", user)
|
auditRec.AddMeta("user", user)
|
||||||
@@ -1946,12 +1946,12 @@ func loginCWS(c *Context, w http.ResponseWriter, r *http.Request) {
|
|||||||
err = c.App.DoLogin(c.AppContext, w, r, user, "", false, false, false)
|
err = c.App.DoLogin(c.AppContext, w, r, user, "", false, false, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.LogErrorByCode(err)
|
c.LogErrorByCode(err)
|
||||||
http.Redirect(w, r, *c.App.Config().ServiceSettings.SiteURL, http.StatusNotFound)
|
http.Redirect(w, r, *c.App.Config().ServiceSettings.SiteURL, http.StatusFound)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
c.LogAuditWithUserId(user.Id, "success")
|
c.LogAuditWithUserId(user.Id, "success")
|
||||||
c.App.AttachSessionCookies(c.AppContext, w, r)
|
c.App.AttachSessionCookies(c.AppContext, w, r)
|
||||||
http.Redirect(w, r, *c.App.Config().ServiceSettings.SiteURL, http.StatusNotFound)
|
http.Redirect(w, r, *c.App.Config().ServiceSettings.SiteURL, http.StatusFound)
|
||||||
}
|
}
|
||||||
|
|
||||||
func logout(c *Context, w http.ResponseWriter, r *http.Request) {
|
func logout(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user