Add generic 'login_as_home' setting

i.e. redirect anonymous users to login instead of showing home page
This commit is contained in:
Lance Edgar 2018-02-12 22:17:46 -06:00
parent 2ab00bfd78
commit a0d9b5ddf4

View file

@ -69,6 +69,10 @@ class CommonView(View):
""" """
Home page view. Home page view.
""" """
if not mobile and not self.request.user:
if self.rattail_config.getbool('tailbone', 'login_is_home', default=True):
raise self.redirect(self.request.route_url('login'))
image_url = self.rattail_config.get( image_url = self.rattail_config.get(
'tailbone', 'main_image_url', 'tailbone', 'main_image_url',
default=self.request.static_url('tailbone:static/img/home_logo.png')) default=self.request.static_url('tailbone:static/img/home_logo.png'))