Skip to content

Comments

fix(security): Remove phantom checkbox behavior in ACL role editor#5254

Open
mattdavenport wants to merge 1 commit intoOpenMage:mainfrom
mattdavenport:fix/acl-phantom-checkbox-security
Open

fix(security): Remove phantom checkbox behavior in ACL role editor#5254
mattdavenport wants to merge 1 commit intoOpenMage:mainfrom
mattdavenport:fix/acl-phantom-checkbox-security

Conversation

@mattdavenport
Copy link
Contributor

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.

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>
Copilot AI review requested due to automatic review settings January 27, 2026 18:50
@github-actions github-actions bot added the Component: Adminhtml Relates to Mage_Adminhtml label Jan 27, 2026
@sonarqubecloud
Copy link

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Adminhtml Relates to Mage_Adminhtml

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant