You are here

public function ConfigSplitExportForm::access in Configuration Split 2.0.x

Checks access for a specific request.

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 'ConfigSplitExportForm::access'
config_split.routing.yml in ./config_split.routing.yml
config_split.routing.yml

File

src/Form/ConfigSplitExportForm.php, line 90

Class

ConfigSplitExportForm
The form for exporting a split.

Namespace

Drupal\config_split\Form

Code

public function access(AccountInterface $account) {
  $split = $this
    ->getSplit();
  return AccessResult::allowedIfHasPermission($account, 'administer configuration split')
    ->andIf(AccessResult::allowedIf($split
    ->get('status')))
    ->addCacheableDependency($split);
}