Reputation: 20555
ive just added ACL
permission to my newly created cake project. However when i try to access it to create groups
and users
i get the following message:
Forbidden
You don't have permission to access /Udlejning/app/webroot
This is the error message for just the index ie localhost/Udlejning/
.
Can anyone tell me why it is redirecting me there and how i can fix it?
It is worth mentioning that i have the following rules in my Users controller:
public function beforeFilter() {
parent::beforeFilter();
// For CakePHP 2.0
$this->Auth->allow('*');
// For CakePHP 2.1 and up
$this->Auth->allow();
}
And that my AppController looks like this:
public function beforeFilter() {
//Configure AuthComponent
$this->Auth->loginAction = array('controller' => 'Users', 'action' => 'login');
$this->Auth->logoutRedirect = array('controller' => 'Users', 'action' => 'login');
$this->Auth->loginRedirect = array('controller' => 'pages', 'action' => 'index');
}
These are my redirect rules
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
Specs
I am using Cake 2.4 and Linux mint
Upvotes: 0
Views: 1510
Reputation: 777
try to set your auth->allow before you call the parent function
public function beforeFilter() {
// For CakePHP 2.0
$this->Auth->allow('*');
// For CakePHP 2.1 and up
$this->Auth->allow();
parent::beforeFilter();
}
Upvotes: 1