You are here

public function DataPolicy::entityOverviewAccess in Open Social 10.1.x

Same name and namespace in other branches
  1. 8.9 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::entityOverviewAccess()
  2. 8.2 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::entityOverviewAccess()
  3. 8.3 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::entityOverviewAccess()
  4. 8.4 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::entityOverviewAccess()
  5. 8.5 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::entityOverviewAccess()
  6. 8.6 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::entityOverviewAccess()
  7. 8.7 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::entityOverviewAccess()
  8. 8.8 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::entityOverviewAccess()
  9. 10.0.x modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::entityOverviewAccess()

File

modules/custom/social_gdpr/src/Controller/DataPolicy.php, line 20

Class

DataPolicy
Class DataPolicy.

Namespace

Drupal\social_gdpr\Controller

Code

public function entityOverviewAccess() {
  $access = parent::entityOverviewAccess();
  if ($access
    ->isForbidden() && $this
    ->currentUser()
    ->hasPermission('edit data policy')) {
    $access = AccessResult::allowed();
  }
  return $access;
}