diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-02-27 18:06:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-27 18:06:38 +0800 |
commit | 7950f2d17d97c37fca22b88d48056de1c00b4d77 (patch) | |
tree | 962531de3ff86417dc06cc4ece6eb22176fb5b8c /internal/context | |
parent | cf3d55fa10f9b16d0ba996f8129f50743b2cd4ad (diff) |
conf: overhaul auth and user settings (#5942)
* conf: overhaul auth and user settings
* ci: update travis Go versions
Diffstat (limited to 'internal/context')
-rw-r--r-- | internal/context/auth.go | 2 | ||||
-rw-r--r-- | internal/context/context.go | 2 |
2 files changed, 2 insertions, 2 deletions
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() |