From 94c7a46ec04abd770b8aed037581c635a5683dd3 Mon Sep 17 00:00:00 2001 From: Tao Date: Tue, 11 May 2021 18:22:40 +0200 Subject: [PATCH] feat: check for custom root in config on dashboard index --- app/controllers/trestle/dashboard_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/trestle/dashboard_controller.rb b/app/controllers/trestle/dashboard_controller.rb index 0e746166..ba3dcea3 100644 --- a/app/controllers/trestle/dashboard_controller.rb +++ b/app/controllers/trestle/dashboard_controller.rb @@ -1,5 +1,9 @@ class Trestle::DashboardController < Trestle::ApplicationController def index + if Trestle.config.root != Trestle.config.path + redirect_to Trestle.config.root and return + end + admin = primary_admin redirect_to admin.path if admin end