Creating access control lists (acl.xml)

The app/code/Foggyline/Helpdesk/etc/acl.xml file is where we define our module access control list resources. Access control list resources are visible under the Magento admin System | Permissions | User Roles area, when we click on the Add New Role button, as shown in the following screenshot:

Creating access control lists (acl.xml)

Looking at the preceding screenshot, we can see our Helpdesk Section under Stores | Settings | Configuration. How did we put it there? We have defined it in our app/code/Foggyline/Helpdesk/etc/acl.xml file with content as follows:

<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/ ...

Get Magento 2 Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.