You are here

public static function WebformAccountAccess::checkOverviewAccess in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Access/WebformAccountAccess.php \Drupal\webform\Access\WebformAccountAccess::checkOverviewAccess()

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.

1 call to WebformAccountAccess::checkOverviewAccess()
WebformAccountAccessTest::testWebformAccountAccess in tests/src/Unit/Access/WebformAccountAccessTest.php
Tests the check webform account access.
1 string reference to 'WebformAccountAccess::checkOverviewAccess'
webform.routing.yml in ./webform.routing.yml
webform.routing.yml

File

src/Access/WebformAccountAccess.php, line 36

Class

WebformAccountAccess
Defines the custom access control handler for the user accounts.

Namespace

Drupal\webform\Access

Code

public static function checkOverviewAccess(AccountInterface $account) {
  return AccessResult::allowedIfHasPermissions($account, [
    'administer webform',
    'administer webform submission',
    'access webform overview',
  ], 'OR');
}