You are here

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

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

Check whether the user can view submissions.

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::checkSubmissionAccess()
WebformAccountAccessTest::testWebformAccountAccess in tests/src/Unit/Access/WebformAccountAccessTest.php
Tests the check webform account access.

File

src/Access/WebformAccountAccess.php, line 64

Class

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

Namespace

Drupal\webform\Access

Code

public static function checkSubmissionAccess(AccountInterface $account) {
  return AccessResult::allowedIfHasPermissions($account, [
    'administer webform',
    'administer webform submission',
    'view any webform submission',
  ], 'OR');
}