Forward index to welcome

refs #4301
This commit is contained in:
Eric Lippmann 2013-06-27 10:15:19 +02:00
parent 1e9fa28433
commit 658fbd0584

View File

@ -25,15 +25,9 @@ class IndexController extends ActionController
public function preDispatch() public function preDispatch()
{ {
parent::preDispatch(); // -> auth :( parent::preDispatch(); // -> auth :(
$enabled = Icinga::app()->moduleManager()->listEnabledModules();
$default = array('docs', 'certificates');
if (count(array_diff($enabled, $default)) === 0) {
if ($this->action_name !== 'welcome') { if ($this->action_name !== 'welcome') {
$this->_forward('welcome'); $this->_forward('welcome');
} }
} else {
$this->_forward('index', 'dashboard');
}
} }
/** /**