authenticate: remove useless/duplicated code block (#962)

This commit is contained in:
Cuong Manh Le 2020-06-22 22:39:09 +07:00 committed by GitHub
parent 6ef74806c7
commit b2f6b42798
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -194,10 +194,7 @@ func (a *Authenticate) SignIn(w http.ResponseWriter, r *http.Request) error {
a.sessionStore.ClearSession(w, r)
return err
}
if err != nil {
a.sessionStore.ClearSession(w, r)
return err
}
// user impersonation
if impersonate := r.FormValue(urlutil.QueryImpersonateAction); impersonate != "" {
s.SetImpersonation(r.FormValue(urlutil.QueryImpersonateEmail), r.FormValue(urlutil.QueryImpersonateGroups))