/** * Specifies the access control rules. * This method is used by the 'accessControl' filter. * @return array access control rules */ public function accessRules() { $model = new User(); return array(array('allow', 'actions' => array('index', 'view'), 'users' => $model->getAuthorStatus(3)), array('allow', 'actions' => array('create', 'update'), 'users' => $model->getAuthorStatus(3)), array('allow', 'actions' => array('admin', 'delete', 'DeleteAll'), 'users' => $model->getAuthorStatus(3)), array('deny', 'users' => array('*'))); }
/** * Specifies the access control rules. * This method is used by the 'accessControl' filter. * @return array access control rules */ public function accessRules() { $model = new User(); return array(array('allow', 'actions' => array('index', 'view'), 'users' => array('@')), array('allow', 'actions' => array('login', 'captcha', 'logout', 'error', 'gii'), 'users' => array('*')), array('allow', 'actions' => array('admin', 'delete'), 'users' => $model->getAuthorStatus(3)), array('deny', 'users' => array('*'))); }