我用验证与授权但是登录后还是403无法访问

我用验证与授权但是登录后还是403无法访问,好像还是规则的问题,但是要怎么弄啊


    public function actionIndex() {


        $username = @$_POST['username'];

        $password = @$_POST['password'];

        

        if (@$username && @$password) {

            

            $identity = new AdminIdentity($username, $password);

            if ($identity->authenticate()){

                Yii::app()->user->login($identity,3600*24*7);}

            else

                echo $identity->errorMessage;

        }

        

        $this->setPageTitle("关于我们-乐移互动(北京)网络科技有限公司");

        $this->render('login');

    }

    

    public function actionComment(){

        echo 'comment';

        

    }

    

    public function filters()

    {

        return array(

            'accessControl',

        );

    }

    

    public function accessRules()

    {

        return array(

            array('allow',

                'actions'=>array('Comment'),

                'roles'=>array('admin'),

            ),

            array('deny',

                'actions'=>array('comment'),

                'users'=>array('*'),

            ),

        );

    }

登录 用户名是 admin,title也是admin

登录是成功的 cookie也写进去了

我只需要一个用户admin管理后台就可以了 不需要 rbac

已解决 谢谢大家