You are here

function views_plugin_display::access in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 6.3 plugins/views_plugin_display.inc \views_plugin_display::access()
  2. 7.3 plugins/views_plugin_display.inc \views_plugin_display::access()

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

1 call to views_plugin_display::access()
views_plugin_display_attachment::attach_to in plugins/views_plugin_display_attachment.inc
Attach to another view.

File

plugins/views_plugin_display.inc, line 1834
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_access_plugin();
  if ($plugin) {
    return $plugin
      ->access($account);
  }

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