mirror of
https://github.com/gogs/gogs.git
synced 2025-12-21 15:50:00 +01:00
auth: support authentication source config file (#3142)
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
api "github.com/gogits/go-gogs-client"
|
||||
|
||||
"github.com/gogits/gogs/models"
|
||||
"github.com/gogits/gogs/models/errors"
|
||||
"github.com/gogits/gogs/pkg/context"
|
||||
"github.com/gogits/gogs/pkg/mailer"
|
||||
"github.com/gogits/gogs/pkg/setting"
|
||||
@@ -23,7 +24,7 @@ func parseLoginSource(c *context.APIContext, u *models.User, sourceID int64, log
|
||||
|
||||
source, err := models.GetLoginSourceByID(sourceID)
|
||||
if err != nil {
|
||||
if models.IsErrLoginSourceNotExist(err) {
|
||||
if errors.IsLoginSourceNotExist(err) {
|
||||
c.Error(422, "", err)
|
||||
} else {
|
||||
c.Error(500, "GetLoginSourceByID", err)
|
||||
|
||||
Reference in New Issue
Block a user