[#27307] Rework how permissions are provided to prevent failures if modules are disabled. Also makes permissions simpler.
Merge pull request #319 from previousnext/27307-rebuild-perms

[#27307] Rework how permissions are provided to prevent failures if modu...