Describe the bug
In the role configuration form, unchecking a module's "Full Module Access" switch also unchecks its "General Module Access", even though the previously stored individual permissions of that module stay checked.
To Reproduce
- Open the form to create a new role.
- Enable "General Module Access" and one individual permission (e.g. /xyz) for a module.
- Save and reopen the role → both enabled are checked (correct).
- Enable "Full Module Access" for the module.
- Save and reopen → all of the module's permissions show as checked (and disabled) as expected.
- Uncheck Full Module Access.
- Observed: "General Module Access" is now unchecked, while the individual permission enabled in step 2 is still checked.
Expected behavior
"General Module Access" stays checked, consistent with the other previously stored permissions, i.e. the state before "Full Module Access" was enabled is restored.
Root Cause
Since 0c8466f module/<name> is explicitly added in getValues() whenever full access is set, because the full-access wildcard <module>/* does not match the module/<name> permission. So general module access always has to be tracked as its own permission. The unset in fetchEntry() then produces the inconsistency.
Suggested Fix
Handle the full permission as a general-access permission as well, so that enabling "Full Module Access" consistently implies "General Module Access" and general access is preserved across the toggle just like the individual permissions.
Your Environment
- Icinga Web version: 2.14.0
- Web browser: Chrome
- PHP version: 8.5.4
Describe the bug
In the role configuration form, unchecking a module's "Full Module Access" switch also unchecks its "General Module Access", even though the previously stored individual permissions of that module stay checked.
To Reproduce
Expected behavior
"General Module Access" stays checked, consistent with the other previously stored permissions, i.e. the state before "Full Module Access" was enabled is restored.
Root Cause
Since 0c8466f
module/<name>is explicitly added ingetValues()whenever full access is set, because the full-access wildcard<module>/*does not match themodule/<name>permission. So general module access always has to be tracked as its own permission. TheunsetinfetchEntry()then produces the inconsistency.Suggested Fix
Handle the full permission as a general-access permission as well, so that enabling "Full Module Access" consistently implies "General Module Access" and general access is preserved across the toggle just like the individual permissions.
Your Environment