Problem/Motivation
Since #3020883: Deprecate GroupPermission access plugin in favor of an argument_validator so it works out of the box with blocks and modules such as VBO the members and group nodes views check permissions in the contextual filter's validator, but the filter keeps Views' default exception value "all". Views skips the validator for the exception value, so /group/all/members returns 200 instead of 403. Rows are still access-filtered, so nothing new is exposed; it's the wrong status code. Views converted using the access plugin's how-to keep "all" too.
Steps to reproduce
- Install Group 4.0.x with Views.
- Create a group type and a group.
- As a user with no group permissions, visit /group/1/members: Access denied.
- Visit /group/all/members: 200, "No members available."
Proposed resolution
I have a branch that clears the exception in both views, with update hooks like 11403/11401, if that's the shape you want. Will submit MR.
Remaining tasks
Not tested: the group nodes path, the update hooks (beyond a local test), the full suite and PHPStan.
Issue fork group-3639879
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
cosmicdreams commentedComment #4
kristiaanvandeneyndeThis looks great, going to make one small test adjustment and commit it. Thanks for the find and fix!
Comment #6
kristiaanvandeneynde