Add in setting to control whether the site has a homepage

This commit is contained in:
James Allen 2017-11-17 11:55:49 +00:00
parent 7440d8da58
commit dd619f44dd

View file

@ -1,4 +1,5 @@
logger = require('logger-sharelatex')
Settings = require('settings-sharelatex')
_ = require('underscore')
Path = require "path"
@ -20,12 +21,11 @@ module.exports = HomeController =
HomeController.home(req, res)
home: (req, res)->
if homepageExists
if Settings.showHomepage and homepageExists
res.render 'external/home'
else
res.redirect "/login"
externalPage: (page, title) ->
return (req, res, next = (error) ->) ->
path = Path.resolve(__dirname + "/../../../views/external/#{page}.pug")