You are here

public function AdminController::access in EU Cookie Compliance (GDPR Compliance) 8

Same name and namespace in other branches
  1. 2.0.x src/Controller/AdminController.php \Drupal\eu_cookie_compliance\Controller\AdminController::access()

Access.

Parameters

AccountInterface $account: The account.

Return value

AccessResult Whether the user has access.

1 string reference to 'AdminController::access'
eu_cookie_compliance.routing.yml in ./eu_cookie_compliance.routing.yml
eu_cookie_compliance.routing.yml

File

src/Controller/AdminController.php, line 23

Class

AdminController
Class AdminController.

Namespace

Drupal\eu_cookie_compliance\Controller

Code

public function access(AccountInterface $account) {
  return AccessResult::allowedIf($account
    ->hasPermission('administer eu cookie compliance popup') || $account
    ->hasPermission('administer eu cookie compliance categories'));
}