An ACL declaration does not prove access is protected
A custom Magento Admin module usually includes three security pieces: an ACL resource declaration, an Admin controller authorization check, and a menu or route linked to that resource.
These pieces are required. They do not prove that restricted users are blocked from the new functionality.
Teams often test new Admin functionality with a full administrator account. That confirms the page works. It does not confirm that the authorization boundary blocks the right users.

Why new Admin resources need focused testing
A custom module can add backend functionality long after Admin roles were created. Existing roles may already contain permissions or resource relationships that affect access to the new feature.
Access depends on the ACL hierarchy, role configuration, stored authorization rules, and the new resource's place in the tree. Controller code alone may not show how access will work for every role.
Examples of sensitive custom Admin functionality include customer data export, order modification actions, integration configuration, report downloads, API credential management, and operational tooling.
If newly deployed Admin functionality can expose data or change business behavior, include authorization testing in deployment validation.
The administrator-only test creates false confidence
A common test follows this pattern: define acl.xml, add ADMIN_RESOURCE or _isAllowed(), deploy, log in as an administrator, confirm that the page loads, and mark the module secure.
That workflow checks whether the feature works. It does not check whether access is restricted.
A proper security test needs at least three cases: an administrator who should be allowed, a limited role that should be denied, and role-specific verification after deployment when new resources are introduced.
What to verify before deployment
This repository does not include a runnable Magento 2/Adobe Commerce codebase or test environment for controlled ACL reproduction. This article does not claim that every Magento module has the same defect.
Source inspection still shows the runtime enforcement path and its dependency on saved role rules:
Controller enforcement path
Magento\Backend\App\AbstractAction::_isAllowed() checks static::ADMIN_RESOURCE through AuthorizationInterface::isAllowed().
Policy evaluation path
Magento\Framework\Authorization\Policy\Acl::isAllowed() delegates to ACL role/resource resolution. This includes fallback behavior when resources are missing.
Role rule persistence
Magento\Authorization\Model\ResourceModel\Rules::saveRel() rewrites authorization_rule rows for a role using posted resources.
Operational implication
Test access with real restricted roles in the target environment. Do not infer their access from an administrator-only test.
Inspect these parts of sensitive Admin access
- the resource hierarchy declared in
etc/acl.xml - the controller authorization resource identifier
- alignment between the Admin menu and route resource
- the behavior of existing restricted roles
- new resources introduced under previously allowed parents
- sensitive controller URLs accessed directly and through menu visibility controls
- behavior before and after role changes or deployment steps
- relevant
authorization_ruledata and the expected permission state - automated functional coverage for allowed and denied roles
- deployment runbook checks for production role access
A hidden menu item does not protect a route. The controller must reject unauthorized direct URL access.
Manual role updates are not a security plan
Manual steps, such as re-saving roles, may fix one access problem. They are a weak long-term process because they depend on someone remembering, running, and checking every affected role.
Use release QA to validate authorization. Define the expected behavior for each sensitive resource, test denied access on purpose, and automate repeatable checks where practical.
If configuration or data migration steps are needed, design and test them against the target Magento version, resource hierarchy, and merchant permission model before using them.
Release checklist for custom Magento Admin modules
- Define the ACL resource and intended parent hierarchy.
- Confirm that every Admin controller uses the intended authorization resource.
- Test with a user who should be allowed.
- Test with a user who should be denied.
- Test direct route access as well as menu visibility controls.
- Review the effect on existing roles.
- Confirm required role update or authorization migration steps.
- Record expected access by role.
- Add regression coverage for sensitive actions where practical.
- Re-test access after deployment in the target environment.
Prove that the right Admin users have access
A custom Magento module can contain an ACL file and an authorization check while still allowing the wrong Admin user to reach the functionality.
Code that looks correct is not enough to answer that question.
For every sensitive Admin resource, test the allowed role, test the denied role, test direct URL access, and verify role behavior after deployment. If access control is important enough to build, test it.
Sources and further reading
- Adobe Commerce: Authorization
- Adobe Commerce Tutorial: Create Access Control List Rules
- Adobe Commerce: Create an Integration (ACL resource selection context)
- Magento Core: Backend AbstractAction Authorization Check
- Magento Core: ACL Policy
- Magento Core: Authorization Rule Persistence
- Magento Core: Authorization Schema (
authorization_rule)