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

  1. Install Group 4.0.x with Views.
  2. Create a group type and a group.
  3. As a user with no group permissions, visit /group/1/members: Access denied.
  4. 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

Command icon 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

cosmicdreams created an issue. See original summary.

cosmicdreams’s picture

Status: Active » Needs review
kristiaanvandeneynde’s picture

Version: 4.0.0-alpha3 » 4.0.x-dev
Status: Needs review » Reviewed & tested by the community

This looks great, going to make one small test adjustment and commit it. Thanks for the find and fix!

kristiaanvandeneynde’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.