- Issue created by @tstoeckler
The concrete problem I faced is with the Auto Entitylabel → module. It provides a permission for each entity type. I had a role with such a permission and then proceeded to uninstall the module providing the respective entity type. Because the permission's provider is Auto Entitylabel and not the module I uninstalled, the permission was not removed by the uninstallation but it still became invalid and Drupal rightly started to complain about that. I originally wanted to open a bug report with the Auto Entitylabel module to change the provider of the permission to the respective entity type's provider, but then I realized that that's not valid either as that would make the permissions stick around if Auto Entitylabel itself is uninstalled.
In general, it seems permissions can depend on the existence of multiple modules, but the single provider does not account for that.
Expected behavior: The permission got removed from the role.
Actual behavior: The permission sticks around even though it is now invalid.
Maybe it's feasible to just support the provider of a permission being an array of module names. That would be a fairly uninvasive change and would not require any changes for modules defining permissions that just depend on a single module.
-
Active
11.1 🔥
user system