Repository navigation
Enforce ACL permission checks on state-changing admin routes - #467
Merged
navneetkumar-pim-webkul merged 2 commits intoJun 4, 2026
Conversation
This was referenced Jun 4, 2026
This was referenced Jun 4, 2026
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.
Summary
The Bouncer middleware only enforces a permission when the current route
name exists in the ACL map (
config/acl.php→$acl->roles[]). Severalstate-changing routes were missing from that map, so they were not covered
by any permission check — they were reachable by any authenticated admin
regardless of their assigned role.
This PR adds the missing route → permission mappings so these routes are
gated consistently with the rest of the codebase.
Root cause
hasPermission()is an exact route→key lookup; routes absent fromconfig/acl.phpskipbouncer()->allow()entirely, and the affectedcontrollers have no inline
bouncer()fallback.Changes
Added the missing route → permission mappings in
acl.php:configuration.integrations.store/.update/.generate_key/.re_generate_secret_keyconfiguration.integrations.create/.editcatalog.products.bulk-edit.save/.save-mediacatalog.products.editcatalog.families.completeness.edit/.update/.mass_updatecatalog.families.editconfiguration.store/.downloadconfigurationcatalog.products.bulkedit/.bulkedit.filters/bulkedit.attributes.fetch-all/products.check-variant/categories.treecatalog.products(view)Mappings were chosen against the exact-match permission model and the
permission tree's ancestor auto-select behaviour, so legitimate users keep
their existing access — read-only views and per-user actions (e.g.
notification.read_all) are intentionally left unchanged.Tests
Extended
WriteRouteBypassRegressionTestwith cases asserting a restricted(dashboard-only) user receives 403 on each newly mapped write route.
IntegrationSection, ProductBulkEdit, CompletenessSettings)
permission_type=all),which bypasses Bouncer; no UI/string changes