Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyController extends Controller
- {
- public function filters()
- {
- return array(
- 'accessControl', // perform access control for CRUD operations
- 'postOnly + delete', // we only allow deletion via POST request
- );
- }
- public function accessRules()
- {
- return array(
- array('allow',
- 'roles'=>array('root', 'admin', 'manager'),
- ),
- array('allow',
- 'actions'=>array('send', 'list'),
- 'users'=>array('*'),
- ),
- array('deny', // deny all users
- 'users'=>array('*'),
- ),
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement