Most of the online stores have multiple admin users like store’s owner, customer service manager, sales representatives, etc to simplify their store management processes. The owner of such an online store may want to restrict the admin users based on their roles. To fulfill that, Magento 2 has the in-built feature called “User Roles”, which allows store owners to define permissions for specific groups of admin users depending on their needs.
By default, Magento creates the user role called “Administrators” which has full access permissions. The store’s owner comes under this user role.
Steps to define new user role in Magento 2
For instance, In the following demonstration, we will see how to create a new user role called “Sales Representatives” and restrict their access based on their role.
Step 1: On the Admin panel, click “System” from the left side menu. Then, click “User Roles” in the “Permissions” section. Here, you will see a list of existing user roles.
Step 2: In the upper-right corner, click the “Add New Role” button to add a new user role.
Step 3: In the “Role Information” section, enter a descriptive “Role Name” like “Sales Representatives”.
In the “Current User Identity Verification” section, enter your current admin password to verify that you have the right to add a new user role.
Step 4: Click “Role Resources” from the left side panel. Here you can see the dropdown with the following option,
- All: If you want to give full access to the new user role, choose this option.
- Custom: If you want to give the limit access to the new user role, choose this option. This will be displayed a list of all the resources. Tick the checkboxes for the resources that you want to assign to your new user role.
Step 5: Finally, click the “Save Role” button to create the new user role.
Hope this helps.