You are here

public function DataPolicy::entityOverviewAccess in Data Policy 8

Check if data policy is created.

Return value

\Drupal\Core\Access\AccessResult The access result.

1 string reference to 'DataPolicy::entityOverviewAccess'
data_policy.routing.yml in ./data_policy.routing.yml
data_policy.routing.yml

File

src/Controller/DataPolicy.php, line 151

Class

DataPolicy
Class DataPolicy.

Namespace

Drupal\data_policy\Controller

Code

public function entityOverviewAccess() {
  if ($this->dataPolicyConsentManager
    ->isDataPolicy()) {
    return AccessResult::allowed();
  }
  return AccessResult::forbidden();
}