public function DataPolicy::entityOverviewAccess in Open Social 8.3
Same name and namespace in other branches
- 8.9 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::entityOverviewAccess()
- 8.2 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::entityOverviewAccess()
- 8.4 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::entityOverviewAccess()
- 8.5 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::entityOverviewAccess()
- 8.6 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::entityOverviewAccess()
- 8.7 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::entityOverviewAccess()
- 8.8 modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::entityOverviewAccess()
- 10.0.x modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::entityOverviewAccess()
- 10.1.x modules/custom/social_gdpr/src/Controller/DataPolicy.php \Drupal\social_gdpr\Controller\DataPolicy::entityOverviewAccess()
Check if data policy is created.
Return value
\Drupal\Core\Access\AccessResult The access result.
Overrides DataPolicy::entityOverviewAccess
File
- modules/
custom/ social_gdpr/ src/ Controller/ DataPolicy.php, line 20
Class
- DataPolicy
- Class DataPolicy.
Namespace
Drupal\social_gdpr\ControllerCode
public function entityOverviewAccess() {
$access = parent::entityOverviewAccess();
if ($access
->isForbidden() && $this
->currentUser()
->hasPermission('edit data policy')) {
$access = AccessResult::allowed();
}
return $access;
}