summaryrefslogtreecommitdiffstats
path: root/routers/web/admin/auths.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-11-11 01:51:09 +0800
committerGitHub <noreply@github.com>2021-11-11 01:51:09 +0800
commit0e189eecaaedc4e2c6ee13882c7b76645af50ccd (patch)
tree80a594464133202dafafe3e1cb2efbcc861fa6cd /routers/web/admin/auths.go
parent43bbc5478370cbfe3ab1eed730ea002ccec74708 (diff)
downloadgitea-0e189eecaaedc4e2c6ee13882c7b76645af50ccd.tar.gz
gitea-0e189eecaaedc4e2c6ee13882c7b76645af50ccd.zip
Move oauth2 error to oauth2 service package (#17603)
Diffstat (limited to 'routers/web/admin/auths.go')
-rw-r--r--routers/web/admin/auths.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/routers/web/admin/auths.go b/routers/web/admin/auths.go
index 803dcafa28..460b740171 100644
--- a/routers/web/admin/auths.go
+++ b/routers/web/admin/auths.go
@@ -10,7 +10,6 @@ import (
"net/http"
"regexp"
- "code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/login"
"code.gitea.io/gitea/modules/auth/pam"
"code.gitea.io/gitea/modules/base"
@@ -386,7 +385,7 @@ func EditAuthSourcePost(ctx *context.Context) {
source.IsSyncEnabled = form.IsSyncEnabled
source.Cfg = config
if err := login.UpdateSource(source); err != nil {
- if models.IsErrOpenIDConnectInitialize(err) {
+ if oauth2.IsErrOpenIDConnectInitialize(err) {
ctx.Flash.Error(err.Error(), true)
ctx.HTML(http.StatusOK, tplAuthEdit)
} else {