Log in
Model

RoleLocator

Magento\Backend\Model\Authorization\RoleLocator

What it does

This class retrieves the ACL (Access Control List) role ID for the currently authenticated admin user in the Magento backend.

Developers use this when they need to determine what permissions the current admin user has, typically for authorization checks or role-based functionality.

It implements the RoleLocatorInterface to provide a standardized way to access role information from the admin session.

Public Methods

  • getAclRoleId()