You are here

public function StatuspageController::access in Nagios Monitoring 8

Checks if the status page should exist.

Return value

\Drupal\Core\Access\AccessResult

File

src/Controller/StatuspageController.php, line 167

Class

StatuspageController
Class StatuspageController produces the HTTP output that the bash script in the nagios-plugin directory understands.

Namespace

Drupal\nagios\Controller

Code

public function access() {
  $config = \Drupal::config('nagios.settings');
  return AccessResult::allowedIf($config
    ->get('nagios.statuspage.enabled'));
}