- Issue created by @malcomio
- Status changed to Postponed: needs info
about 1 year ago 9:35am 14 December 2023 - π³π±Netherlands Lendude Amsterdam
Tried to reproduce this on a clean Umami install but not problems there as far as I can tell
Steps done:
* Add a new Vocabulary
* Add permissions for this Vocabulary to the Editor and Author roles
* Check the config for these roles in config sync (/admin/config/development/configuration/single/export) and make sure the permissions are there
* Delete the Vocabulary
* Check the config for these roles in config sync (/admin/config/development/configuration/single/export) and make sure the permissions are goneAm I missing steps? Or does this only break when using Drush?
- π¬π§United Kingdom malcomio
We were also encountering this issue when granting permissions via update hooks.
As a workaround, we added an update hook to manually revoke the permissions:
$storage = \Drupal::entityTypeManager()->getStorage('taxonomy_vocabulary'); $vocabularies = [ 'article_categories', 'codes', 'event_categories', ]; foreach ($vocabularies as $vid) { $vocabulary = Vocabulary::load($vid); if ($vocabulary) { $permissions = [ "create terms in $vid", "delete terms in $vid", "edit terms in $vid", ]; user_role_revoke_permissions('superuser', $permissions); $storage->delete([$vid => $vocabulary]); }
We haven't tested the original issue since then.