public function MigrationConfirmationForm::access in Lightning Workflow 8.2
Same name and namespace in other branches
- 8.3 modules/lightning_scheduler/src/Form/MigrationConfirmationForm.php \Drupal\lightning_scheduler\Form\MigrationConfirmationForm::access()
Performs access check.
Return value
AccessResult Allowed if the current user is droot (Drupal root).
1 string reference to 'MigrationConfirmationForm::access'
- lightning_scheduler.routing.yml in modules/
lightning_scheduler/ lightning_scheduler.routing.yml - modules/lightning_scheduler/lightning_scheduler.routing.yml
File
- modules/
lightning_scheduler/ src/ Form/ MigrationConfirmationForm.php, line 60
Class
- MigrationConfirmationForm
- Provides a UI for migrating or purging scheduled transition data.
Namespace
Drupal\lightning_scheduler\FormCode
public function access() {
$uid = (int) $this
->currentUser()
->id();
// This migration is serious business, so only droot can do it.
return AccessResult::allowedIf($uid === 1);
}