You are here

protected function AddDataPolicyRevision::blockAccess in Open Social 10.0.x

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

Indicates whether the block should be shown.

Blocks with specific access checking should override this method rather than access(), in order to avoid repeating the handling of the $return_as_object argument.

Parameters

\Drupal\Core\Session\AccountInterface $account: The user session for which to check access.

Return value

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

Overrides BlockPluginTrait::blockAccess

See also

self::access()

File

modules/custom/social_gdpr/src/Plugin/Block/AddDataPolicyRevision.php, line 46

Class

AddDataPolicyRevision
Provides a 'AddDataPolicyRevision' block.

Namespace

Drupal\social_gdpr\Plugin\Block

Code

protected function blockAccess(AccountInterface $account) {
  return AccessResult::allowedIfHasPermission($account, 'edit data policy');
}