1 views_plugin_display.inc views_plugin_display::access($account = NULL)

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

File

core/modules/views/plugins/views_plugin_display.inc, line 2648
Contains the base display plugin.

Class

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

Code

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

  // Full override.
  if (user_access('access all views', $account)) {
    return TRUE;
  }

  $plugin = $this->get_plugin('access');
  if ($plugin) {
    return $plugin->access($account);
  }

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