public static function WebformAccountAccess::checkSubmissionAccess in Webform 8.5
Same name and namespace in other branches
- 6.x 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\AccessCode
public static function checkSubmissionAccess(AccountInterface $account) {
return AccessResult::allowedIfHasPermissions($account, [
'administer webform',
'administer webform submission',
'view any webform submission',
], 'OR');
}