The \Drupal\gcontent_moderation\Access\LatestRevisionCheck
checks "view latest" permissions for all related group content for the node when there is no pending revision. The inner service \Drupal\content_moderation\Access\LatestRevisionCheck
check if there is a pending revision. If there is not a pending revision then it returns AccessResult::forbidden()
. The \Drupal\gcontent_moderation\Access\LatestRevisionCheck
will continue to check all groups even though ultimately the access check will be forbidden. All of the AccessResult::orIf()
checks will result in Forbidden since the inner service's result is Forbidden.
Add a check for !$access->isForbidden()
.
Needs review
1.0
Code