Problem/Motivation

There is a node access documentation topic, but it does not include the various classes and interfaces that interact with node access, only the procedural code.

Proposed resolution

Add the appropriate @ingroup to classes and interfaces in the node module that play a role in node access.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Task because there is no functional bug, just some extra digging needed.
Issue priority Normal; it's a fairly small issue, but it does make the documentation topic incomplete
Unfrozen changes Unfrozen because it only changes documentation.

Remaining tasks

Contributor tasks needed
Task Novice task? Contributor instructions Complete?
Create a patch Instructions
Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standards Instructions

User interface changes

API changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xjm’s picture

Issue summary: View changes

Adding beta evaluation.

jhodgdon’s picture

The only class I see mentioned in the text is NodeAccessControlHandler, which implements NodeAccessControlHandlerInterface...

Are these the only two that need @ingroup to be included here?

sander.devos’s picture

Assigned: Unassigned » sander.devos

I'm going to try and work on this issue.

sander.devos’s picture

Status: Active » Needs review
FileSize
1006 bytes

My first ever patch. Hope you all like it!

xjm’s picture

Status: Needs review » Needs work

Thanks @sander.devos!

There are a couple more classes and interfaces we need to add. See, for example, NodeGrantDatabaseStorageInterface. Take a look inside the class at the dependencies to get an idea. See the related issues around #2461049: Node module permissions are broken if hook_node_grants is implemented for more ideas as well.

sander.devos’s picture

Status: Needs work » Needs review
FileSize
4.29 KB
2.42 KB

I just applied more changes. I think I got most of the classes that interact with node access.

I also found that BookNodeIsRemovableAccessCheck makes use of node access. But is in another module. Do I have to add @ingroup node_access here as well or not?

jhodgdon’s picture

Assigned: sander.devos » xjm
Status: Needs review » Reviewed & tested by the community

I don't think that the class in the Book module belongs in the node access topic... the list looks good to me. Provisionally setting to RTBC and assigning to xjm to decide whether everything is complete now.

xjm’s picture

Assigned: xjm » Unassigned
Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/node/src/NodeTypeAccessControlHandler.php
+++ b/core/modules/node/src/NodeTypeAccessControlHandler.php
@@ -16,6 +16,7 @@
  * Defines the access control handler for the node type entity type.
  *
  * @see \Drupal\node\Entity\NodeType
+ * @ingroup node_access
  */
 class NodeTypeAccessControlHandler extends EntityAccessControlHandler {

So this one I think should not be in the group since it is about access control for creating content types, not for nodes.

Looks good to me other than that!

JacobSanford’s picture

Assigned: Unassigned » JacobSanford
Status: Needs work » Needs review
FileSize
3.79 KB
512 bytes

Update as requested in #8.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks like this fixes #8, so should be RTBC now. Thanks!

xjm’s picture

Assigned: JacobSanford » Unassigned
Status: Reviewed & tested by the community » Fixed

This issue only changes documentation, so per https://www.drupal.org/core/beta-changes, this can be completed any time during the Drupal 8 beta phase. Committed and pushed to 8.0.x. Thanks!

  • xjm committed c085079 on 8.0.x
    Issue #2473123 by sander.devos, JacobSanford, xjm, jhodgdon: Add node...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.