forked from forgejo/forgejo
parent
280f4bebbf
commit
5a62ae5cbf
4 changed files with 14 additions and 1 deletions
|
@ -224,6 +224,9 @@ func SignedInUser(ctx *macaron.Context, sess session.Store) (*models.User, bool)
|
|||
}
|
||||
|
||||
if u == nil {
|
||||
if !setting.Service.EnableBasicAuth {
|
||||
return nil, false
|
||||
}
|
||||
u, err = models.UserSignIn(uname, passwd)
|
||||
if err != nil {
|
||||
if !models.IsErrUserNotExist(err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue