aboutsummaryrefslogtreecommitdiff
path: root/internal/auth/auth.go
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-02-27 18:06:38 +0800
committerGitHub <noreply@github.com>2020-02-27 18:06:38 +0800
commit7950f2d17d97c37fca22b88d48056de1c00b4d77 (patch)
tree962531de3ff86417dc06cc4ece6eb22176fb5b8c /internal/auth/auth.go
parentcf3d55fa10f9b16d0ba996f8129f50743b2cd4ad (diff)
conf: overhaul auth and user settings (#5942)
* conf: overhaul auth and user settings * ci: update travis Go versions
Diffstat (limited to 'internal/auth/auth.go')
-rw-r--r--internal/auth/auth.go4
1 files changed, 2 insertions, 2 deletions
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",