public function DisplayPluginBase::access

Determine if the user has access to this display of the view.

1 call to DisplayPluginBase::access()
Attachment::attachTo in drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/Attachment.php
Attach to another view.

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php, line 2515
Contains Drupal\views\Plugin\views\display\DisplayPluginBase.

Class

DisplayPluginBase
The default display plugin handler. Display plugins handle options and basic mechanisms for different output methods.

Namespace

Drupal\views\Plugin\views\display

Code

public function access($account = NULL) {
  if (!isset($account)) {
    global $user;
    $account = $user;
  }

  // Full override.
  if (user_access('access all views', $account)) {
    return TRUE;
  }
  $plugin = $this
    ->getPlugin('access');
  if ($plugin) {
    return $plugin
      ->access($account);
  }

  // fallback to all access if no plugin.
  return TRUE;
}