This is my current code:
class AppController extends Controller {
var $components = array('Auth');
function beforeFilter() {
$this->Auth->authorize = 'controller';
$this->Auth->allow('*');
$this->Auth->deny('admin', 'accnt', 'faq'); // does not work
}
function isAuthorized() {
if ($this->Auth->user('role') == 'admin') {
$this->Auth->allow('admin');
}
}
}
What I want to do is something like the following:
function beforeFilter() {
$this->Auth->authorize = 'controller';
$this->Auth->allow('pages/faq', 'pages/aboutus', 'users/
register');
$this->Auth->deny('pages/accnt', 'pages/admin', 'categories/
edit');
}
function isAuthorized() {
if ($this->Auth->user('role') == 'admin') {
$this->Auth->allow('pages/admin', 'categories/edit');
}
$this->Auth->allow('pages/accnt');
}
}
NOTE: the pages does not have a model or controller..I HAVE read the
cookbooks severaltimes, served the Cakegroup, posted several message,
got different replies, but just can' t seem to find a answer to
this... I would be grateful if someone can actually show me ..
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---