I have a problem allowing guests access actions in modules, but not in actions in controllers of the application.
In the Control.php file I have added this code to prevent guests any access:
public function filters() {
return array('accessControl');
}
public function accessRules() {
return array(
array('allow',
'users'=>array('@'),
),
array('deny')
);
}
Now I am adding a module that has controls and actions ment for guests. The controllers get this code, but guests are redirected to the login URL given in "loginUrl" configuration for user component (WebUser class):
public function filters() {
return array('accessControl');
}
public function accessRules() {
return array(
array('allow',
'users'=>array('*'),
)
);
}
On the other hand, when I add an application controller with the same access code as the previous example above in the module, guests do get access.
Can anyone explain what is wrong?