首页 > 代码库 > (yii学习笔记)控制器权限控制

(yii学习笔记)控制器权限控制

public function filters(){	return array(		‘accessControl‘, // per		‘postOnly + delete‘, //	);}public function accessRules(){	return array(		array(‘allow‘,  // allow all users to pe			‘actions‘=>array(‘index‘,‘view‘),			‘users‘=>array(‘*‘),		),		array(‘allow‘, // allow authenticated us			‘actions‘=>array(‘create‘,‘update‘),			‘users‘=>array(‘@‘),		),		array(‘allow‘, // allow admin user to pe			‘actions‘=>array(‘admin‘,‘delete‘),			‘users‘=>array(‘admin‘),		),		array(‘deny‘,  // deny all users			‘users‘=>array(‘*‘),		),	);}