title: how to setup BjyAuthorize in Zend Framework 2?
body: <p>I'm trying to use <a href="https://github.com/bjyoungblood/BjyAuthorize" rel="nofollow">BjyAuthorize</a> in a sample application in ZF2 and I have a bit of an issue setting it up.</p>
  
  <p>I have an <code>Admin</code> module and I want to give permissions for the user to access it.
  I also have the <code>ZfcUser</code> module and that one seems to work just fine with this acl.</p>
  
  <p>The way I set up the db's is like his:</p>
  
  <pre><code>user_role
  role_id     default     parent
  ------------------------------
  user        1           admin
  admin       2           NULL
  
  
  user_role_linker
  user_id     role_id
  -------------------
  1           user
  </code></pre>
  
  <p>I'm not sure this is set up correctly, also I'm not sure why <code>role_id</code> is a varchar ??!!</p>
  
  <p>In any case, with this setup the ZfcUser works just fine.</p>
  
  <p>The problem is when I try to use a different module, where I add:</p>
  
  <pre><code>array('controller' =&gt; 'Admin\Controller\Index', 'roles' =&gt; array('guest','user'))
  </code></pre>
  
  <p>I get</p>
  
  <blockquote>
    <p>403 Forbidden
    You are not authorized to access Admin\Controller\Admin ::indexAction() .</p>
  </blockquote>
  
  <p>In the README file it is mentioned that I could use <code>$this-&gt;isAllowed($resource[, $privilege])</code> in my controller or view, but that code is wrong and I'm not sure what is the <code>$resource</code> or the <code>$privilege</code></p>
  
  <p>So I guess my question is how can I use this module? Did anyone got it to work?</p>