function views_plugin_display::access
3.x views_plugin_display.inc | views_plugin_display::access($account = NULL) |
2.x views_plugin_display.inc | views_plugin_display::access($account = NULL) |
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;
}