[Rt-commit] r19820 - rt/3.999/trunk/lib/RT
sartak at bestpractical.com
sartak at bestpractical.com
Mon Jun 1 15:00:44 EDT 2009
Author: sartak
Date: Mon Jun 1 15:00:43 2009
New Revision: 19820
Modified:
rt/3.999/trunk/lib/RT/Dispatcher.pm
Log:
If admin mode is on and we have a config plugin, redirect / to configuration
Modified: rt/3.999/trunk/lib/RT/Dispatcher.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Dispatcher.pm (original)
+++ rt/3.999/trunk/lib/RT/Dispatcher.pm Mon Jun 1 15:00:43 2009
@@ -148,8 +148,16 @@
}
delete $args->{$field};
}
+};
+
+before qr{^/$} => run {
+ return unless Jifty->config->framework('AdminMode');
+ my $config_plugin = Jifty->find_plugin('Jifty::Plugin::Config')
+ or return;
+
+ redirect $config_plugin->config_url;
+};
-}
after qr/.*/ => run {
RT::Interface::Web::Handler::cleanup_request();
More information about the Rt-commit
mailing list