There has been a hiccup in #3239001 when converting the "$type_id delete any entities" permission, as it was updated to "delete any $type_id entities", which misses the "storage" word, causing problems when deleting storage entities.
StoragePermission::buildPermissions missed it too by providing the "delete any $type_id entities" permission, while the actual StorageAccessControlHandler class is looking for "delete any $type_id storage entities".

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nanak created an issue. See original summary.

mxh’s picture

Thanks for the bug report, and many thanks for the patch, highly appreciate it! On a first look into it, this looks good to me. Unfortunately I currently have no time left for testing if that works as expected, but will have a look at it later on in case no other one tested it already.

mxh’s picture

  • mxh committed 0d41fff on 1.1.x
    Issue #3255595 by nanak, mxh: "%type_id delete any entities" permission...
mxh’s picture

Status: Needs review » Fixed

I tested storage_fix_delete_all_type_storage_entities_permission.patch, file applied cleanly and I manually tested by first adding some permissions regards deleting Storage entities. Then applied the patch, run the update hook which ran through without any errors. Exported configuration and checked again. The delete permissions remained to be the same, which is what to expect as a result from the update hook.

Committed into 1.1.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.