Hi,
problem is that I have 2 login pages… /login/hub/ and /login/admin/ when a user without admin privileges logs into the frontend then tries to perform an unauthorized action in the admin area (i.e. /admin/activityGraph/), he doesn’t get redirected to loginUrl variable but rather I get just a blank screen, and it appears actionActivityGraph() doesn’t get accessed…
ideally i’d like to set loginUrl on the fly in the controller when authorization fails…the access rules are working fine just not the redirection…
Admin Controller:
public function accessRules() {
$db_name=Yii::app()->user->getState("db_name");
$cid=$_GET['cid'];
return array(
array('deny',
'expression'=>"'$db_name'!='$cid'",
),
array('deny',
'expression'=>"'".$this->admin."'!='1'",
)
);
}
Login Controller:
public function accessRules() {
$db_name=Yii::app()->user->getState("db_name");
$cid=$_GET['cid'];
return array(
array('deny',
'expression'=>"'$db_name'!='$cid'",
),
);
}
Thanks,
Nathaniel