public function accessRules()
{
//here goes rules for everybody ..
if($this->isConnected()) { //my function to check if user connected. But he is not Logged throw Yii-Login
$accessRules = array(
array('allow',
'actions'=>array(
'action1','action11'
),
'users'=>array('*'),
),
);
}
else {
$accessRules = array(
array('allow',
'actions'=>array(
'action3','action4'
),
'roles'=>array('@'), //Yii-Login authenticated user
)
);
}
return $accessRules;
}
Or there is some other (better) way to implement this.
cause i have too login types. One is for those who use yii bult-in login system and others who use 3rd site logins (like facebook Connect, but fr now its other site, no facebook). And there is different rules for each login type… im going to simplify this, but for now this is it.