From 7950f2d17d97c37fca22b88d48056de1c00b4d77 Mon Sep 17 00:00:00 2001 From: ᴜɴᴋɴᴡᴏɴ 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/context/auth.go | 2 +- internal/context/context.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/context') diff --git a/internal/context/auth.go b/internal/context/auth.go index 83c219e1..6d1b9262 100644 --- a/internal/context/auth.go +++ b/internal/context/auth.go @@ -71,7 +71,7 @@ func Toggle(options *ToggleOptions) macaron.Handler { c.SetCookie("redirect_to", url.QueryEscape(conf.Server.Subpath+c.Req.RequestURI), 0, conf.Server.Subpath) c.Redirect(conf.Server.Subpath + "/user/login") return - } else if !c.User.IsActive && conf.Service.RegisterEmailConfirm { + } else if !c.User.IsActive && conf.Auth.RequireEmailConfirmation { c.Data["Title"] = c.Tr("auth.active_your_account") c.HTML(200, "user/auth/activate") return diff --git a/internal/context/context.go b/internal/context/context.go index 65614362..3504ad71 100644 --- a/internal/context/context.go +++ b/internal/context/context.go @@ -323,7 +323,7 @@ func Contexter() macaron.Handler { log.Trace("Session ID: %s", sess.ID()) log.Trace("CSRF Token: %v", c.Data["CSRFToken"]) - c.Data["ShowRegistrationButton"] = conf.Service.ShowRegistrationButton + c.Data["ShowRegistrationButton"] = !conf.Auth.DisableRegistration c.Data["ShowFooterBranding"] = conf.ShowFooterBranding c.renderNoticeBanner() -- cgit v1.2.3