The bundle exposed filter options are agressively filtered during access checks.

Created on 2 February 2022, almost 3 years ago
Updated 27 March 2024, 8 months ago

Describe your bug or feature request.

On our site, we don't provide access to products by default, and as a result customers and product editors get access to view and edit products based on a specific taxonomy term relation. As a result, the default access to a product is denied, unless the user has access granted.

The view's bundle filter, provided by commerce, overrides the options list, and remove values that the user doesn't see, but since this creates a stub entity, with only a type, or special field isn't added as well. This results in access checks failing, and the users being denied access in the views plugin to all product bundles, and the filter being empty. Ultimately this functionality was added to commerce in #3003105: The views bundle (type) filter shows items that the user doesn't have access to β†’ due to core issue πŸ› The "bundle" views filter shows options the user doesn't have access to Needs work .

Solution.

The solution here is not to check direct access to the entity, but instead check access to the product/entity type.

As follow up, we should ensure that this custom layer gets removed one the core patch in πŸ› The "bundle" views filter shows options the user doesn't have access to Needs work gets merged and released.

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Views integration

Created by

πŸ‡ΊπŸ‡ΈUnited States richgerdes New Jersey, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024