blob: e98d8cc2d32c3e54ba8774946b6217a09bc89449 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
<?php
class DefaultController extends Controller
{
public function accessRules()
{
return array(
array('deny',
'actions'=>array('*'),
'users'=>array('*'),
),
array('allow',
'actions'=>array('*'),
'roles'=>array('admin'),
)
);
}
public function beforeAction($action)
{
$this->layout = Yii::app()->controller->module->layout;
return true;
}
public function actionIndex()
{
$this->render('index');
}
public function actionAdmin()
{
$this->render('admin');
}
public function filters()
{
return array(
'accessControl', // perform access control for CRUD operations
);
}
}
|