SiZE писал(а):modelfak писал(а):просто сюда так в обрезаном виде вставил
Стесняешься своего кода?
ВОт код полностью, роли не работают почему то (( использовал рецепт
http://yiiframework.ru/doc/cookbook/ru/access.rbac.file
Код: Выделить всё
public function accessRules()
{
return array(
array('allow', // allow all users to perform 'index' and 'view' actions
'actions'=>array('view', 'create', 'Reg','orderers','index', 'Get_cat', 'Test'),
// 'roles'=>array('administrator'),
'users'=>array('*'),
),
array('allow',
'actions'=>array('Add_role'),
'roles'=>array('administrator'),
),
array('allow', // allow authenticated user to perform 'create' and 'update' actions
'actions'=>array('update', 'MyShows', 'MyOrders'),
'users'=>array('@'),
),
array('allow', // allow admin user to perform 'admin' and 'delete' actions
'actions'=>array('admin','delete','excel','excel1', 'Settings', 'Art', 'MyArts', 'Lk', 'Load_image'),
'users'=>array('@'),
),
array('deny', // deny all users
'users'=>array('*'),
),
);
}