Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Accessrules()

$
0
0
hi
this is my code:
class UserManageController extends Controller
{
    

        
    
            public function accessRules()
            {
                $staff = Rool::model()->find('sid=:i',array(':i'=>yii::app()->session['sid']));
                $p = $staff->role;
            
                return array(
                        array('allow', 
                        'actions'=>array('accept','delete','edit'),
                        'expression'=> $p.' > 1',
                        ),
                        array('allow',
                        'actions'=>array('add'),
                        'users'=>array('*') ,
                        ),
                       array('deny', 
                        'users'=>array('*'),
                        ),
       

                       
                );
             }

//..... where is my actions....
}


but accessRules() , not work.
plz help me.
thanks

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>