こんにちは、どの方法を使用するのが最適かを理解したいのですが、簡単な例がある場合は、どのロールを魔女に与えるかを指定できません。
public function accessRules()
{
return array(
array('allow', // allow authenticated to perform 'index' and 'view' actions
'actions'=>array('index','view'),
'users'=>array('@'),
),
array('allow', // allow authenticated user to perform 'create' and 'update' actions
'actions'=>array('create','update'),
'users'=>array('@'),
),
array('allow', // allow admin user to perform 'admin' and 'delete' actions
'actions'=>array('admin','delete'),
'users'=>array('admin'),
),
array('deny', // deny all users
'users'=>array('*'),
),
);
}