5 * Definition of views_handler_filter_node_access.
9 * Filter by node_access records.
11 * @ingroup views_filter_handlers
13 class views_handler_filter_node_access extends views_handler_filter {
14 function admin_summary() { }
15 function operator_form(&$form, &$form_state) { }
16 function can_expose() {
21 * See _node_access_where_sql() for a non-views query based implementation.
24 if (!user_access('administer nodes') && module_implements('node_grants')) {
25 $table = $this->ensure_my_table();
27 foreach (node_access_grants('view') as $realm => $gids) {
28 foreach ($gids as $gid) {
29 $grants->condition(db_and()
30 ->condition($table . '.gid', $gid)
31 ->condition($table . '.realm', $realm)
36 $this->query->add_where('AND', $grants);
37 $this->query->add_where('AND', $table . '.grant_view', 1, '>=');