Browse Source

Add option to send the user to a login box for the landing page

pull/4715/head
Andrew Rice 7 years ago
parent
commit
0ea3db1c17
  1. 3
      pkg/setting/setting.go

3
pkg/setting/setting.go

@ -46,6 +46,7 @@ type LandingPage string
const ( const (
LANDING_PAGE_HOME LandingPage = "/" LANDING_PAGE_HOME LandingPage = "/"
LANDING_PAGE_EXPLORE LandingPage = "/explore" LANDING_PAGE_EXPLORE LandingPage = "/explore"
LANDING_PAGE_LOGIN LandingPage = "/user/login"
) )
var ( var (
@ -481,6 +482,8 @@ func NewContext() {
switch sec.Key("LANDING_PAGE").MustString("home") { switch sec.Key("LANDING_PAGE").MustString("home") {
case "explore": case "explore":
LandingPageURL = LANDING_PAGE_EXPLORE LandingPageURL = LANDING_PAGE_EXPLORE
case "login":
LandingPageURL = LANDING_PAGE_LOGIN
default: default:
LandingPageURL = LANDING_PAGE_HOME LandingPageURL = LANDING_PAGE_HOME
} }

Loading…
Cancel
Save