What is Magento ACL?
Short answer Magento ACL, or Access Control List, connects named application resources with role-based authorization. Modules declare capabilities and server entry points enforce access. An allowed resource does not automatically supply customer ownership or store-level data filtering. Menus, controllers, APIs and data endpoints need consistent boundaries.
- Modules declare named resources 01
- A user or integration receives permitted resources 02
- The server checks the relevant capability 03
- Data providers and UI endpoints need their own protection 04
- Resource checks are combined with data boundaries 05
Watch for this Relying on the navigation tree for enforcement
From a resource definition to a server-side decision
A declaration, role assignment and enforcement point are separate parts of the permission model.
-
01
Modules declare named resources
A module's acl.xml contributes resources to the application permission tree. Use stable resource identifiers for meaningful capabilities such as viewing a record or changing it. Declaring the resource does not automatically protect every route that handles the data.
-
02
A user or integration receives permitted resources
Admin roles assign capabilities to users, and integrations can receive API resource access. Authentication establishes the caller identity; authorization decides whether that identity may perform the action. Review the actual caller context instead of assuming every authenticated user is privileged.
-
03
The server checks the relevant capability
Standard Admin controllers can use ADMIN_RESOURCE, while REST/SOAP routes reference resources in webapi.xml. Other entry points may need explicit authorization. Hiding a menu or button is a usability choice, not enforcement of a direct request.
-
04
Data providers and UI endpoints need their own protection
A UI component can expose information through a rendering/data endpoint without the expected page controller being the only entry point. Apply the appropriate aclResource and server checks. Verify unauthorized requests as well as the normal allowed path.
-
05
Resource checks are combined with data boundaries
Permission to view orders is not automatically permission to every order, website or customer record. Check the scope and ownership rules of the exact release, edition and installed feature. Exports, mass actions and APIs must enforce the same intended boundary.
Where explicit authorization matters
Define the permitted action and dataset for the actual caller, then verify each server entry point.
-
Adding an Admin feature
Define which roles may view, create, edit or delete the feature's records. Enforce the intended resource on each server entry point and avoid inheriting an unnecessarily broad default capability.
-
Exposing an integration endpoint
Choose the appropriate resource for the API operation. Guest and self resources have specific semantics; they are not interchangeable shortcuts around authorization. An authenticated request can still require ownership checks.
-
Delegating administration
Grant the resources needed for the task and review permission-management access carefully. Test a restricted role, not only a full administrator. Store-scoping capabilities depend on the implementation being used.
-
Reviewing a data-bearing interface
Inspect the page, provider, export and action endpoints together. A protected navigation menu can coexist with an unprotected data path, so acceptance should include direct unauthorized requests with non-sensitive test data.
Three authorization assumptions to check
A visible menu, an authenticated account and access to one resource do not prove the intended data boundary.
-
Relying on the navigation tree for enforcement
Removing a menu link does not prevent access to a known route or API. Enforce the resource where the server processes the request, and test denial paths rather than relying on a hidden control.
-
Reusing a broad resource for every action
Viewing a list and deleting its records can require different privileges. Model capabilities deliberately, and keep the role assignments and server checks consistent with the intended access policy.
-
Assuming one allowed resource proves data isolation
Row ownership, website/store restrictions and business rules need appropriate checks beyond a resource label. Validate the installed scope feature and every relevant access path before claiming that a restricted user cannot reach another dataset.
Magento ACL, frequently asked questions
-
ACL vs admin role vs user, what’s the difference?
The ACL defines named resources and authorization rules. A role groups permissions for an identity, and an Admin user is an account assigned a role. These concepts work together; neither creating a resource nor assigning a role establishes that a custom endpoint actually checks it. -
Why doesn’t my custom admin page enforce permissions?
Confirm that the controller follows the intended Admin authorization mechanism and identifies the specific resource, then inspect the effective role. Check separate provider, export and action routes too. A menu resource or a frontend-only visibility condition does not enforce server access. -
How do I restrict an admin user to a single store-view?
Resource permission alone does not filter records by store view. Use the scope capabilities supported by the exact release, edition and extensions, and verify their behavior on reads, writes, exports and APIs. Do not assume that adding a store-view-shaped ACL resource supplies data isolation. -
Are REST API integrations bound to ACL?
Resources declared in acl.xml can be referenced by REST/SOAP webapi.xml routes for Admin and integration access. Guest and self access have different rules. Validate the endpoint's actual authorization and record ownership; integration authentication does not imply unrestricted access. -
Can a role have access to admin but not to all stores?
Where the installed role-scoping feature supports it, roles can combine resource permissions with a limited website/store scope. Verify the precise supported boundary and entry points. A custom module must not ignore scope checks simply because the user has permission to open its Admin page. -
What’s the difference between Magento’s ACL and Laminas Acl?
Magento adds application resource configuration, role assignment and authorization integration around its ACL infrastructure. The inspected Framework Acl class extends Laminas Permissions Acl. Use Magento's appropriate authorization services and resource contracts rather than bypassing the application's role context with an unrelated standalone ACL object.
Reviewing a custom permission boundary?
Describe the roles, actions and data scope using non-sensitive examples. Include page, provider, export and API behavior when defining acceptance.