I'm building a site with CakePHP which I would like to have 3 sections:
- public area
- user area
- admin area
I've setup prefix routing in routes.php which looks like
Router::connect('/user/:controller/:action/*', array('prefix' => 'user', 'user' => true));
Router::connect('/admin/:controller/:action/*', array('prefix' => 'admin', 'admin' => true));
I want it so any actions with the user_ prefix will redirect to a login screen if not already logged in and user type is 'normal' (side question: can a user be normal :P) and any actions with admin_ prefix also redirect but require user type of admin.
I started trying to use the Auth component but it seems quite inflexible whereas ACL seems over the top. Could anyone offer some advice on the best way to achieve what I want?