mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-23 13:54:27 +02:00
parent
3996efc3cf
commit
bbe55f28b6
@ -3,6 +3,9 @@
|
||||
use Icinga\Application\Icinga;
|
||||
use Icinga\Web\Window;
|
||||
|
||||
if ($this->getConfig()->get('frontend', 'disabled', 'no') === 'yes') {
|
||||
return;
|
||||
}
|
||||
$this->providePermission('director/api', $this->translate('Allow to access the director API'));
|
||||
$this->providePermission('director/audit', $this->translate('Allow to access the full audit log'));
|
||||
$this->providePermission(
|
||||
|
@ -15,6 +15,7 @@ next (will be 1.8.0)
|
||||
* FIX: It's now possible to set Endpoint ports > 32767 on PostgreSQL (#928)
|
||||
* FEATURE: Data Fields can now be grouped into categories (#1969)
|
||||
* FEATURE: Inspect is now available for Packages, Stages and Files (#1995)
|
||||
* FEATURE: Allow to disable the Director frontend / UI (#2007)
|
||||
|
||||
1.7.2
|
||||
-----
|
||||
|
@ -4,6 +4,7 @@ namespace Icinga\Module\Director\Web\Controller;
|
||||
|
||||
use Icinga\Application\Benchmark;
|
||||
use Icinga\Data\Paginatable;
|
||||
use Icinga\Exception\NotFoundError;
|
||||
use Icinga\Exception\ProgrammingError;
|
||||
use Icinga\Module\Director\Monitoring;
|
||||
use Icinga\Module\Director\Web\Controller\Extension\CoreApi;
|
||||
@ -44,6 +45,11 @@ abstract class ActionController extends Controller implements ControlsAndContent
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
if (! $this->getRequest()->isApiRequest()
|
||||
&& $this->Config()->get('frontend', 'disabled', 'no') === 'yes'
|
||||
) {
|
||||
throw new NotFoundError('Not found');
|
||||
}
|
||||
$this->initializeTranslator();
|
||||
Benchmark::measure('Director base Controller init()');
|
||||
$this->checkForRestApiRequest();
|
||||
|
Loading…
x
Reference in New Issue
Block a user