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.
Problem/Motivation
I had a few entities using the permissions provider and this recent change broke a bunch of things.
$expected_permissions = [
'administer blue_entity' => 'Administer blue entities',
'access blue_entity overview' => 'Access the blue entities overview page',
- 'view any blue_entity' => 'View any blue entity',
- 'view own blue_entity' => 'View own blue entities',
'create blue_entity' => 'Create blue entities',
'update any blue_entity' => 'Update any blue entity',
'update own blue_entity' => 'Update own blue entities',
'delete any blue_entity' => 'Delete any blue entity',
'delete own blue_entity' => 'Delete own blue entities',
+ 'view blue_entity' => 'View blue entities',
];
$data[] = [$entity_type->reveal(), $expected_permissions];
Proposed resolution
I realise the module was still in alpha, but I wonder if an update hook to help people migrate would be helpful here?
Comments
Comment #2
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedI suppose this got in before stable commerce #2909973: Update Commerce for Entity API 8.x-1.0-beta1, but I do wonder how many users will be scratching their head after this update?
Comment #3
Sam152 CreditAttribution: Sam152 as a volunteer and at PreviousNext commentedComment #4
bojanz CreditAttribution: bojanz at Centarro commentedAlpha modules provide no BC guarantees.
Keep in mind that the permissions were not removed, just moved to a different provider (UncacheableEntityPermissionProvider), for better cacheability. I hope that became clear after reviewing the Commerce update.