You are here

class DomainPathListCheck in Domain Path 8

Custom access control handler for the domain path overview page.

Hierarchy

Expanded class hierarchy of DomainPathListCheck

File

src/Access/DomainPathListCheck.php, line 11

Namespace

Drupal\domain_path\Access
View source
class DomainPathListCheck {

  /**
   * Handles route permissions on the domain path list page.
   *
   * @param \Drupal\Core\Session\AccountInterface $account
   *   The account making the route request.
   *
   * @return \Drupal\Core\Access\AccessResult
   */
  public static function viewDomainPathList(AccountInterface $account) {
    if ($account
      ->hasPermission('administer domain paths') || $account
      ->hasPermission('view domain path list')) {
      return AccessResult::allowed();
    }
    return AccessResult::forbidden();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DomainPathListCheck::viewDomainPathList public static function Handles route permissions on the domain path list page.