function views_handler::access

Same name in other branches
  1. 7.x-3.x includes/handlers.inc \views_handler::access()

Check whether current user has access to this handler.

Return value

boolean

6 methods override views_handler::access()
views_handler_field_comment_link_delete::access in modules/comment/views_handler_field_comment_link_delete.inc
Check whether current user has access to this handler.
views_handler_field_comment_link_reply::access in modules/comment/views_handler_field_comment_link_reply.inc
Check whether current user has access to this handler.
views_handler_field_locale_link_edit::access in modules/locale/views_handler_field_locale_link_edit.inc
Check whether current user has access to this handler.
views_handler_field_node_revision_link_delete::access in modules/node/views_handler_field_node_revision_link_delete.inc
Check whether current user has access to this handler.
views_handler_field_node_revision_link_revert::access in modules/node/views_handler_field_node_revision_link_revert.inc
Check whether current user has access to this handler.

... See full list

File

includes/handlers.inc, line 598

Class

views_handler
Base handler, from which all the other handlers are derived. It creates a common interface to create consistency amongst handlers and data.

Code

function access() {
    if (isset($this->definition['access callback']) && function_exists($this->definition['access callback'])) {
        if (isset($this->definition['access arguments']) && is_array($this->definition['access arguments'])) {
            return call_user_func_array($this->definition['access callback'], $this->definition['access arguments']);
        }
        return $this->definition['access callback']();
    }
    return TRUE;
}