forked from NYANDEV/forgejo
Fix windows build error (#14263)
* fix build * take flash error message back and fix more windows lint error * performance optimization * own step to check lint for windows Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
parent
4ef5f17a7e
commit
a1c9e8f266
12 changed files with 61 additions and 44 deletions
|
@ -12,7 +12,7 @@ import (
|
|||
|
||||
// SignedInUser returns the user object of signed user.
|
||||
// It returns a bool value to indicate whether user uses basic auth or not.
|
||||
func SignedInUser(req *http.Request, ds DataStore, sess SessionStore) (*models.User, bool) {
|
||||
func SignedInUser(req *http.Request, w http.ResponseWriter, ds DataStore, sess SessionStore) (*models.User, bool) {
|
||||
if !models.HasEngine {
|
||||
return nil, false
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ func SignedInUser(req *http.Request, ds DataStore, sess SessionStore) (*models.U
|
|||
if !ssoMethod.IsEnabled() {
|
||||
continue
|
||||
}
|
||||
user := ssoMethod.VerifyAuthData(req, ds, sess)
|
||||
user := ssoMethod.VerifyAuthData(req, w, ds, sess)
|
||||
if user != nil {
|
||||
_, isBasic := ssoMethod.(*Basic)
|
||||
return user, isBasic
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue