title: Yii framework : role based access control
body: <p>I am implementing role based access control using yii framework for the application mentioned in the Agile web application development using yii framework book.I have implemented every thing up to page number 189.  </p>
  
  <p>page number 189 says that following method can be used to check whether user is allowed to perform some action or not. </p>
  
  <blockquote>
    <p>If( Yii::app()->user->checkAccess('createIssue')) {
            //perform needed logic }</p>
  </blockquote>
  
  <p>but this method always return false for users who have been assigned to <strong><em>createIssue</em></strong> operation</p>
  
  <p>following is the database diagram for RBAC </p>
  
  <p><img src="https://i.stack.imgur.com/5ez9p.png" alt="enter image description here"></p>
  
  <p>i am linking UserID and role for authassignment table using following command. </p>
  
  <blockquote>
    <p>$auth=Yii::app()->authManager;    $auth->assign('member',1);</p>
  </blockquote>
  
  <p>As you can see my user table and authassignment table does not have direct relationship. </p>
  
  <p>And i have configured main.php file in configuration folder </p>
  
  <p>These are the all we have done so far and could any body share your knowledge with me if any thing is missing here. Thanks in advance for any help.</p>