summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorschaffman5 <mschaff@gmail.com>2017-11-20 02:48:09 -0500
committerLunny Xiao <xiaolunwen@gmail.com>2017-11-20 15:48:09 +0800
commit7e6c198f21ba2696954310184f384fee7c277575 (patch)
tree4ace1550d5dac8320ddbbf1ffa6e96030fab35e1 /modules
parentc3b6383b3a91e476c5a6978a0fb355191271a51c (diff)
downloadgitea-7e6c198f21ba2696954310184f384fee7c277575.tar.gz
gitea-7e6c198f21ba2696954310184f384fee7c277575.zip
Apply LANDING_PAGE config options for logged in users (#2894)
* Extended LANDINGPAGE config variable to logged in users and added switch for 'organizations' in addition to 'home' and 'explore'. * Updated comments. Signed-off-by: Mike Schaffer <mschaff@gmail.com> * Extended LANDINGPAGE config variable to trigger when user logs in and added switch for 'organizations' in addition to 'home' and 'explore'. Signed-off-by: Mike Schaffer <mschaff@gmail.com> * Extended LANDINGPAGE config variable to logged in users and added switch for 'organizations' in addition to 'home' and 'explore'. * Updated comments. Signed-off-by: Mike Schaffer <mschaff@gmail.com> * Extended LANDINGPAGE config variable to trigger when user logs in and added switch for 'organizations' in addition to 'home' and 'explore'. Signed-off-by: Mike Schaffer <mschaff@gmail.com> * Removed superfluous conditional and correct whitespace. Signed-off-by: Mike Schaffer <mschaff@gmail.com> * Update app.ini Reverted new line. * Formatting. Signed-off-by: Mike Schaffer <mschaff@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/setting.go7
1 files changed, 5 insertions, 2 deletions
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
}