You are here

public function UserOneSettingsForm::access in User One 8

Allow access only for user one.

Parameters

\Drupal\Core\Session\AccountInterface $account: Run access checks for this account.

Return value

\Drupal\Core\Access\AccessResultInterface The access result.

1 string reference to 'UserOneSettingsForm::access'
userone.routing.yml in ./userone.routing.yml
userone.routing.yml

File

src/Form/UserOneSettingsForm.php, line 185

Class

UserOneSettingsForm
User One configuration form.

Namespace

Drupal\userone\Form

Code

public function access(AccountInterface $account) {
  if ($account
    ->id() == 1) {
    return AccessResult::allowed();
  }
  return AccessResult::forbidden();
}