You are here

public static function YamlFormAccess::checkOverviewAccess in YAML Form 8

Check whether the user has 'administer' or 'overview' permission.

Parameters

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

Return value

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

2 string references to 'YamlFormAccess::checkOverviewAccess'
yamlform.routing.yml in ./yamlform.routing.yml
yamlform.routing.yml
yamlform_templates.routing.yml in modules/yamlform_templates/yamlform_templates.routing.yml
modules/yamlform_templates/yamlform_templates.routing.yml

File

src/Access/YamlFormAccess.php, line 51

Class

YamlFormAccess
Defines the custom access control handler for the form entities.

Namespace

Drupal\yamlform\Access

Code

public static function checkOverviewAccess(AccountInterface $account) {
  return AccessResult::allowedIf($account
    ->hasPermission('administer yamlform') || $account
    ->hasPermission('administer yamlform submission') || $account
    ->hasPermission('access yamlform overview'));
}