diff options
-rw-r--r-- | conf/app.ini | 2 | ||||
-rw-r--r-- | modules/setting/setting.go | 7 | ||||
-rw-r--r-- | routers/user/auth.go | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/conf/app.ini b/conf/app.ini index 603f8c14fc..7001bb9905 100644 --- a/conf/app.ini +++ b/conf/app.ini @@ -164,7 +164,7 @@ STATIC_ROOT_PATH = APP_DATA_PATH = data ; Application level GZIP support ENABLE_GZIP = false -; Landing page for non-logged users, can be "home" or "explore" +; Landing page, can be "home", "explore", or "organizations" LANDING_PAGE = home ; Enables git-lfs support. true or false, default is false. LFS_START_SERVER = false diff --git a/modules/setting/setting.go b/modules/setting/setting.go index df80ebdb57..6fe0214a8b 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -56,8 +56,9 @@ type LandingPage string // enumerates all the landing page types const ( - LandingPageHome LandingPage = "/" - LandingPageExplore LandingPage = "/explore" + LandingPageHome LandingPage = "/" + LandingPageExplore LandingPage = "/explore" + LandingPageOrganizations LandingPage = "/explore/organizations" ) // MarkupParser defines the external parser configured in ini @@ -737,6 +738,8 @@ func NewContext() { switch sec.Key("LANDING_PAGE").MustString("home") { case "explore": LandingPageURL = LandingPageExplore + case "organizations": + LandingPageURL = LandingPageOrganizations default: LandingPageURL = LandingPageHome } diff --git a/routers/user/auth.go b/routers/user/auth.go index eb41e2f994..c353db8984 100644 --- a/routers/user/auth.go +++ b/routers/user/auth.go @@ -97,7 +97,7 @@ func checkAutoLogin(ctx *context.Context) bool { ctx.SetCookie("redirect_to", "", -1, setting.AppSubURL) ctx.Redirect(redirectTo) } else { - ctx.Redirect(setting.AppSubURL + "/") + ctx.Redirect(setting.AppSubURL + string(setting.LandingPageURL)) } return true } |