Révision d719f12f
Ajouté par Assos Assos il y a plus de 8 ans
drupal7/sites/all/modules/views/modules/node/views_handler_filter_node_access.inc | ||
---|---|---|
23 | 23 |
function query() { |
24 | 24 |
if (!user_access('administer nodes') && module_implements('node_grants')) { |
25 | 25 |
$table = $this->ensure_my_table(); |
26 |
$grants = db_or(); |
|
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) |
|
32 |
); |
|
33 |
} |
|
34 |
} |
|
26 |
$grants = node_add_node_grants_to_query(node_access_grants('view')); |
|
35 | 27 |
|
36 | 28 |
$this->query->add_where('AND', $grants); |
37 | 29 |
$this->query->add_where('AND', $table . '.grant_view', 1, '>='); |
Formats disponibles : Unified diff
Weekly update of contrib modules