I am trying to write code in such a manner that, when anyone logs in to my sight with user role=merchant he will not allow accessing my home page and when anyone login with user role=customer then he will allow accessing the home page, rather than that anyone without a login can visit my home page
how to allow home page to access without login and when any userlogin restrict access to home page to for that user in cakephp 3
69 views Asked by mohammad arif At
1
You can define your rule in isAuthorized action in
/src/Controller/AppController.phpCakephp -> Authentication and Authorization -> Authorization (who’s allowed to access what)