In UserRole model
public function addRole(){
$test=$this->RoleName;
if (!Yii::app()->user->checkAccess($this->RoleName,$this->idUser))
{
$this->save();
Yii::app()->authManager->assign($this->RoleName, $this->idUser, '');
}
}
The rolename im tying to insert is not in authassignment table but it not passes save!!!