I have a front end module that I have developed, which I want to restrict to logged in users only. Stressing this is front end users, not admin users we are talking about.

I assume this can be done through ACL settings in much the same way the admin modules do - however I can't find the answer anywhere.

Is this possible or is it necessary to check on every action that they are logged in (I want to avoid doing this as it has a large margin for error - I simply only want logged in users to access said pages)?


No, there is no ACL for the frontend. To allow access to logged in users in your custom controller, you can do it the same way as the Magento_Customer module, as described here: Magento 2 - Check login for page in custom module

If necessary, add an additional check for the customer group.

But if you want to be able to configure an ACL for customer groups, you'll have to implement that from scratch, although ou will probably be able to reuse some parts of the admin module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.