I am creating a website with CakePHP that would like to have 3 sections:
- public area
- user area
- administration area
I have a prefix routing setting in routes.php that looks like
Router::connect('/user/:controller/:action/*', array('prefix' => 'user', 'user' => true));
Router::connect('/admin/:controller/:action/*', array('prefix' => 'admin', 'admin' => true));
I want any actions with the user_ prefix to be redirected to the login screen if it has not been registered yet, and the user type is “normal” (side question: can the user be normal: P) and any actions with the admin_ prefix should also be redirected but request an admin user type.
I started trying to use the Auth component, but it seems rather inflexible, while the ACL seems to be on top. Can anyone offer some tips on how to best achieve what I want?
source
share