function 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 2826

Class

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

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->get_plugin('access');
    if ($plugin) {
        return $plugin->access($account);
    }
    // Fallback to all access if no plugin.
    return TRUE;
}