Когда я нажимаю кнопку Enroll Now
под пропуском на панели навигации, \merry_flowers\views\students\add.ctp
должен отображаться.
Вместо этого отображается страница входа в систему.
Кто-нибудь знает, что я делаю не так?
Вот мой app_controller.php
для проекта:
class AppController extends Controller {
var $components=array('Auth','Session','Cookie');
function beforeFilter(){
if (isset($this->Auth)){
$this->Auth->userModel='MerryParent';
$this->Auth->loginAction=array('controller'=>'merry_parents','action'=>'login');
//var_dump($this->data);
$this->Auth->allow('*');
$this->Auth->loginRedirect=array('controller'=>'merry_parents','action'=>'report_card');
$this->Auth->logoutRedirect=array('controller'=>'merry_parents','action'=>'register');
$this->Auth->deny('report_card');
$this->Auth->authorize='controller';
}
else
$this->Session->setFlash('Auth has not been set');
}
function isAuthorized(){
return true;
}
Любая помощь очень ценится.