View own Gift Cards permission is not taken into account in GiftcardAccessControlHandler

Created on 14 July 2022, about 3 years ago
Updated 6 August 2024, 11 months ago

Problem/Motivation

Commerce Giftcard module provides a permission names "View own Giftcards". However this permission is not considered when trying to access to a gift card.

Only users with 'access giftcard overview' or 'administer commerce_giftcard' has access to them.

Steps to reproduce

Create a view using commerce_giftcard id as contextual filter and try to add a validation like the attached one.
Try to access to the view with a user that has "View own Giftcards" permission and not 'access giftcard overview' or 'administer commerce_giftcard'
Page Not Found instead of the expected result

Proposed resolution

Add extra logic to GiftcardAccessControlHandler to take into account that permission.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇪🇸Spain plopesc Valladolid

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

Merge Requests

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