Hi!

As saif in the title, the permissions won't get removed after uninstalling the module.
Steps:
1, Install node_clone
2, Create some roles and add permission from node_clone to them
3, Export the configs
4, Uninstall node_clone
5, Export the configs again

After the second export, only core.extension gets updated and the node_clone.settings get deleted. If you look up the permission YAML files they'll still have the node_clone permissions.
Doing a manual save on the permissions page doesn't make a difference, drupal won't remove them after this either.
To remove these permissions from the roles, you have to do it manually prior to uninstalling the module.

Comments

mhavelant created an issue. See original summary.

effulgentsia’s picture

This is a bug with core: #2026983: [regression] Grants for permissions defined by a module are not revoked / removed from Role config entities when that module is uninstalled, and all modules are affected by it.

In the meantime, this module could implement its own hook_uninstall() to clean up the role entities. Or the project maintainers could choose to not implement a one-off fix and rather close this as a duplicate of the core bug.

ptmkenny’s picture

Status: Active » Closed (duplicate)