I want to set a breakpoint in xdebug to debug an interesting issue the site is having regarding user access to certain nodes. My question is where do I do that in D8? Where, specifically, is the D8 replacement for user_access to be found?

Not using any form of node access, but am using Group and Content Moderation. The problem could lie with either of them, but I thought the best approach would be to break where Drupal decides whether a user has access to node/###/edit, then step from there.

The problem is that the user's role's permissions give all node and content moderation permissions for the applicable content type. Yet, when going to the admin/content page or admin/content/moderation, given two nodes of the same content type authored by a user of the given role, with the same node and moderation status, only one has an edit button. In viewing the nodes, only one has an edit link.

I have rebuilt permissions, to no effect.


The /node/{node}/edit path is defined by the entity.node.edit_form route. This route uses the _entity_access requirement to lookup access. When that route's requested the entity API will execute EntityAccessCheck::access() and NodeAccessControlHandler::access() to lookup the account permssions for the relevant node.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.