You are here

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'
domain_path.routing.yml in ./domain_path.routing.yml
domain_path.routing.yml

File

src/Access/DomainPathListCheck.php, line 21

Class

DomainPathListCheck
Custom access control handler for the domain path overview page.

Namespace

Drupal\domain_path\Access

Code

public static function viewDomainPathList(AccountInterface $account) {
  if ($account
    ->hasPermission('administer domain paths') || $account
    ->hasPermission('view domain path list')) {
    return AccessResult::allowed();
  }
  return AccessResult::forbidden();
}