summaryrefslogtreecommitdiffstats
path: root/routers/user
diff options
context:
space:
mode:
authorSandro Santilli <strk@kbt.io>2017-08-19 17:34:49 +0200
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-08-19 17:34:49 +0200
commit2c3a229a3c4cc3e86c5a1130bbd058ba78022a6a (patch)
tree674c05386c007308c7b4033756eba7cc6536b58c /routers/user
parente7653a67a10483aa0e2c9cc019abe9021e8df9ce (diff)
downloadgitea-2c3a229a3c4cc3e86c5a1130bbd058ba78022a6a.tar.gz
gitea-2c3a229a3c4cc3e86c5a1130bbd058ba78022a6a.zip
Add OpenID configuration in install page (#2276)
Diffstat (limited to 'routers/user')
-rw-r--r--routers/user/auth_openid.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/routers/user/auth_openid.go b/routers/user/auth_openid.go
index dcc3fcf0fc..a5124680dd 100644
--- a/routers/user/auth_openid.go
+++ b/routers/user/auth_openid.go
@@ -259,6 +259,7 @@ func ConnectOpenID(ctx *context.Context) {
// ConnectOpenIDPost handles submission of a form to connect an OpenID URI to an existing account
func ConnectOpenIDPost(ctx *context.Context, form auth.ConnectOpenIDForm) {
+
oid, _ := ctx.Session.Get("openid_verified_uri").(string)
if oid == "" {
ctx.Redirect(setting.AppSubURL + "/user/login/openid")
@@ -300,10 +301,6 @@ func ConnectOpenIDPost(ctx *context.Context, form auth.ConnectOpenIDForm) {
// RegisterOpenID shows a form to create a new user authenticated via an OpenID URI
func RegisterOpenID(ctx *context.Context) {
- if !setting.Service.EnableOpenIDSignUp {
- ctx.Error(403)
- return
- }
oid, _ := ctx.Session.Get("openid_verified_uri").(string)
if oid == "" {
ctx.Redirect(setting.AppSubURL + "/user/login/openid")
@@ -328,10 +325,6 @@ func RegisterOpenID(ctx *context.Context) {
// RegisterOpenIDPost handles submission of a form to create a new user authenticated via an OpenID URI
func RegisterOpenIDPost(ctx *context.Context, cpt *captcha.Captcha, form auth.SignUpOpenIDForm) {
- if !setting.Service.EnableOpenIDSignUp {
- ctx.Error(403)
- return
- }
oid, _ := ctx.Session.Get("openid_verified_uri").(string)
if oid == "" {
ctx.Redirect(setting.AppSubURL + "/user/login/openid")