fix(security): Remove phantom checkbox behavior in ACL role editor#5254
Open
mattdavenport wants to merge 1 commit intoOpenMage:mainfrom
Open
fix(security): Remove phantom checkbox behavior in ACL role editor#5254mattdavenport wants to merge 1 commit intoOpenMage:mainfrom
mattdavenport wants to merge 1 commit intoOpenMage:mainfrom
Conversation
When new ACL resources are added to the system, roles without explicit rules for those resources would show them as "checked" in the UI based on parent permission inheritance. However, the actual runtime permission check uses different logic (falls back to null/root), so users may not actually have access. This creates a security risk: when an admin edits a role and saves it without unchecking these phantom checkboxes, the permissions get explicitly granted - potentially giving users access to features they were never intended to have. The fix removes the fallback inheritance logic in the UI. New resources will now appear unchecked by default, requiring explicit selection by the admin. This prevents accidental permission grants. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the admin role editor UI’s fallback permission inheritance so newly introduced ACL resources no longer appear pre-selected (“phantom checked”) when a role has no explicit rule for them, reducing the risk of accidental permission grants on save.
Changes:
- Removed the
_getFallbackHelper()accessor from the role resources tab block. - Removed the logic that inferred checkbox state for undefined resources via parent permission fallback; selection now reflects only explicit allowed rules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



When new ACL resources are added to the system, roles without explicit rules for those resources would show them as "checked" in the UI based on parent permission inheritance. However, the actual runtime permission check uses different logic (falls back to null/root), so users may not actually have access.
This creates a security risk: when an admin edits a role and saves it without unchecking these phantom checkboxes, the permissions get explicitly granted - potentially giving users access to features they were never intended to have.
The fix removes the fallback inheritance logic in the UI. New resources will now appear unchecked by default, requiring explicit selection by the admin. This prevents accidental permission grants.