You are here

public function SystemStatusController::access in System Status 8.2

1 string reference to 'SystemStatusController::access'
system_status.routing.yml in ./system_status.routing.yml
system_status.routing.yml

File

src/Controller/SystemStatusController.php, line 178

Class

SystemStatusController
Returns responses for Sensei's Pants routes.

Namespace

Drupal\system_status\Controller

Code

public function access($system_status_token) {
  $token = $this
    ->config('system_status.settings')
    ->get('system_status_token');
  if ($token == $system_status_token) {
    return AccessResult::allowed();
  }
  else {
    return AccessResult::forbidden();
  }
}