public function LightweightCronController::access in Scheduler 8
Same name and namespace in other branches
- 2.x src/Controller/LightweightCronController.php \Drupal\scheduler\Controller\LightweightCronController::access()
Checks access.
Parameters
string $cron_key: The cron key.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
1 string reference to 'LightweightCronController::access'
File
- src/
Controller/ LightweightCronController.php, line 65
Class
- LightweightCronController
- Controller for the lightweight cron.
Namespace
Drupal\scheduler\ControllerCode
public function access($cron_key) {
$valid_cron_key = $this
->config('scheduler.settings')
->get('lightweight_cron_access_key');
return AccessResult::allowedIf($valid_cron_key == $cron_key);
}