From 7950f2d17d97c37fca22b88d48056de1c00b4d77 Mon Sep 17 00:00:00 2001 From: ᴜɴᴋɴᴡᴏɴ <u@gogs.io> Date: Thu, 27 Feb 2020 18:06:38 +0800 Subject: conf: overhaul auth and user settings (#5942) * conf: overhaul auth and user settings * ci: update travis Go versions --- internal/auth/auth.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/auth/auth.go') diff --git a/internal/auth/auth.go b/internal/auth/auth.go index 23db4e2b..4c34062f 100644 --- a/internal/auth/auth.go +++ b/internal/auth/auth.go @@ -90,7 +90,7 @@ func SignedInUser(ctx *macaron.Context, sess session.Store) (_ *db.User, isBasic uid, isTokenAuth := SignedInID(ctx, sess) if uid <= 0 { - if conf.Service.EnableReverseProxyAuth { + if conf.Auth.EnableReverseProxyAuthentication { webAuthUser := ctx.Req.Header.Get(conf.Security.ReverseProxyAuthenticationUser) if len(webAuthUser) > 0 { u, err := db.GetUserByName(webAuthUser) @@ -101,7 +101,7 @@ func SignedInUser(ctx *macaron.Context, sess session.Store) (_ *db.User, isBasic } // Check if enabled auto-registration. - if conf.Service.EnableReverseProxyAutoRegister { + if conf.Auth.EnableReverseProxyAutoRegistration { u := &db.User{ Name: webAuthUser, Email: gouuid.NewV4().String() + "@localhost", -- cgit v1.2.3