Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Wishlists don't implement EntityOwnerInterface because orders don't.
However, orders don't because the customer isn't able to freely change their order once it has been placed.
There is no such restriction here, the customer can always modify their own wishlist.
So, let's implement EntityOwnerInterface and remove the customer methods.
We should also add uid and owner entity keys, like we did for products and variations in https://www.drupal.org/project/commerce/issues/3007275#comment-12822472
Comment | File | Size | Author |
---|---|---|---|
#12 | commerce_wishlist-3023998-entity_owner_interface-12.patch | 1.77 KB | czigor |
|
Comments
Comment #2
bojanz CreditAttribution: bojanz at Centarro commentedNote that this will also simplify permissions, since we'll no longer need to declare our "own" permission.
Comment #3
czigor CreditAttribution: czigor at Centarro commentedComment #4
bojanz CreditAttribution: bojanz at Centarro commentedWe can remove WishlistAccessControlHandler and WishlistPermissionProvider completely.
Comment #5
czigor CreditAttribution: czigor at Centarro commentedFixed it.
Comment #6
bojanz CreditAttribution: bojanz at Centarro commentedNot like that :) We still need to specify the previous parents.
Comment #7
czigor CreditAttribution: czigor at Centarro commentedAh ok, fixed it.
Comment #8
bojanz CreditAttribution: bojanz at Centarro for Ny Media AS commentedThanks, looks good now.
Comment #10
agoradesign CreditAttribution: agoradesign commentedkeep pushin' on...
Comment #11
bojanz CreditAttribution: bojanz at Centarro for Ny Media AS commentedWe forgot a bit:
Query access will crash without those.
Comment #12
czigor CreditAttribution: czigor at Centarro for Ny Media AS commentedAdded the missing keys.
Comment #13
bojanz CreditAttribution: bojanz at Centarro for Ny Media AS commentedLooks good.
Comment #15
bojanz CreditAttribution: bojanz at Centarro for Ny Media AS commentedThanks!
Comment #17
jsacksick CreditAttribution: jsacksick at Centarro commentedWas there any particular reason for not using EntityOwnerTrait??
Comment #18
agoradesign CreditAttribution: agoradesign commentedhmm I guess that trait didn't exist at that time
Comment #19
jsacksick CreditAttribution: jsacksick at Centarro commentedI created #3118707: Use the EntityOwnerTrait.