public static function DomainPathListCheck::viewDomainPathList in Domain Path 8
Handles route permissions on the domain path list page.
Parameters
\Drupal\Core\Session\AccountInterface $account: The account making the route request.
Return value
\Drupal\Core\Access\AccessResult
1 string reference to 'DomainPathListCheck::viewDomainPathList'
File
- src/
Access/ DomainPathListCheck.php, line 21
Class
- DomainPathListCheck
- Custom access control handler for the domain path overview page.
Namespace
Drupal\domain_path\AccessCode
public static function viewDomainPathList(AccountInterface $account) {
if ($account
->hasPermission('administer domain paths') || $account
->hasPermission('view domain path list')) {
return AccessResult::allowed();
}
return AccessResult::forbidden();
}