By Md Eqbal Ahmad


2019-04-12 11:11:10 8 Comments

I have installed node_access for maintaining access per node. I need to write a sql query using entityQuery service and display only those nodes which respect node_access configuration per node. I am not able to find any documentation for this. Currently my entityQuery is showing all results to ananymous users. Please let me know If one write query to resepct node_access module.

$query = \Drupal::entityQuery('node');
$query->condition('type', 'article');
$nids = $query->execute();

0 comments

Related Questions

Sponsored Content

1 Answered Questions

Why I cannot get translated entities

1 Answered Questions

2 Answered Questions

[SOLVED] How do I check if a user has view access to a node, in a template file?

  • 2018-09-12 21:35:02
  • Marcus C.
  • 395 View
  • 4 Score
  • 2 Answer
  • Tags:   views 8 nodes

4 Answered Questions

[SOLVED] How do I programmatically set a taxonomy term for a node?

1 Answered Questions

[SOLVED] How to write EntityQuery so that it checks user's access to nodes?

1 Answered Questions

[SOLVED] How node_access tag works with query?

  • 2017-03-25 07:03:58
  • Sugandh Khanna
  • 280 View
  • 0 Score
  • 1 Answer
  • Tags:   8 nodes

3 Answered Questions

[SOLVED] How can I speed up drupal's node_save() function?

  • 2013-04-09 04:55:46
  • blue928
  • 5054 View
  • 9 Score
  • 3 Answer
  • Tags:   7 performance nodes

Sponsored Content