class DomainListCheck in Domain Access 8
Custom access control handler for the domain overview page.
Hierarchy
- class \Drupal\domain\Access\DomainListCheck
Expanded class hierarchy of DomainListCheck
File
- domain/
src/ Access/ DomainListCheck.php, line 11
Namespace
Drupal\domain\AccessView source
class DomainListCheck {
/**
* Handles route permissions on the domain list page.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The account making the route request.
*
* @return \Drupal\Core\Access\AccessResult
* The access result.
*/
public static function viewDomainList(AccountInterface $account) {
if ($account
->hasPermission('administer domains') || $account
->hasPermission('view domain list') || $account
->hasPermission('view assigned domains')) {
return AccessResult::allowed();
}
return AccessResult::forbidden();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DomainListCheck:: |
public static | function | Handles route permissions on the domain list page. |