Cakephp 1.3, router and authentication problem
- by Zhlobopotam
Trying to implements simple privileges for admin user. Don't need huge acl rules and groups system. There are admin users, overs - just registered users. They can't access actions with admin prefix. So It was implemented in cakephp1.2 version with following code in app_controller:
function isAuthorized() {
if (isset($this->params[Configure::read('Routing.admin')])) {
if ($this->Auth->user('admin') != 1) {
return false;
}
}
return true;
}
But in 1.3 Routing.admin had been deprecated. How to rewrite it for use with 1.3 framework? Need some help.