I am trying to limit user to only some resources. I tried using ACL but can't figure out how to enable / use it. I am using SimpleAuth, login works, but I can't deny the user access to some resource. Could someone please give me a hint?
Phil, thanks for answering!
Where is the right place to put this? In Controller_Common::before()?
(where Controller_Common is some class all my Controllers extend)
And then I just specify the roles in app/config/simpleauth.php?
I am asking mostly to find the preferred way of doing things. I am quite sure I am not the first one to use authentication with FuelPHP.
Hi Andy,
Basically you put it where ever it is required.
If you wish to allow global access to all controllers that extend Controller_Common using the rights allowed for this controller then yeah put it there but it can also be used at a controller method level etc...
app/config/simpleauth.php
Name your controllers and the various rights associated to them and their methods. It can be as fine grained as you want.
eg.