Advertisement
Guest User

Untitled

a guest
Sep 27th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. class MyController extends Controller
  2. {
  3. public function filters()
  4. {
  5. return array(
  6. 'accessControl', // perform access control for CRUD operations
  7. 'postOnly + delete', // we only allow deletion via POST request
  8. );
  9. }
  10.  
  11. public function accessRules()
  12. {
  13. return array(
  14. array('allow',
  15. 'roles'=>array('root', 'admin', 'manager'),
  16. ),
  17. array('allow',
  18. 'actions'=>array('send', 'list'),
  19. 'users'=>array('*'),
  20. ),
  21. array('deny', // deny all users
  22. 'users'=>array('*'),
  23. ),
  24. );
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement