Skip to content
Snippets Groups Projects
Unverified Commit bae798c9 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2369917 by Valentine94, pjonckiere, er.pushpinderrana, jhodgdon, xjm,...

Issue #2369917 by Valentine94, pjonckiere, er.pushpinderrana, jhodgdon, xjm, Berdir, Wim Leers: 'Blindly returning FALSE will break other node access modules' is a misleading sentence

(cherry picked from commit 70b5d870)
parent a367e2c9
No related branches found
No related tags found
No related merge requests found
...@@ -297,11 +297,17 @@ function hook_node_grants_alter(&$grants, \Drupal\Core\Session\AccountInterface ...@@ -297,11 +297,17 @@ function hook_node_grants_alter(&$grants, \Drupal\Core\Session\AccountInterface
* permission may always view and edit content through the administrative * permission may always view and edit content through the administrative
* interface. * interface.
* *
* Note that not all modules will want to influence access on all node types. If * The access to a node can be influenced in several ways:
* your module does not want to explicitly allow or forbid access, return an * - To explicitly allow access, return an AccessResultInterface object with
* AccessResultInterface object with neither isAllowed() nor isForbidden() * isAllowed() returning TRUE. Other modules can override this access by
* equaling TRUE. Blindly returning an object with isForbidden() equaling TRUE * returning TRUE for isForbidden().
* will break other node access modules. * - To explicitly forbid access, return an AccessResultInterface object with
* isForbidden() returning TRUE. Access will be forbidden even if your module
* (or another module) also returns TRUE for isNeutral() or isAllowed().
* - To neither allow nor explicitly forbid access, return an
* AccessResultInterface object with isNeutral() returning TRUE.
* - If your module does not return an AccessResultInterface object, neutral
* access will be assumed.
* *
* Also note that this function isn't called for node listings (e.g., RSS feeds, * Also note that this function isn't called for node listings (e.g., RSS feeds,
* the default home page at path 'node', a recent content block, etc.) See * the default home page at path 'node', a recent content block, etc.) See
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment