title: Configuration in role based routing using BjyAuthorize is not working
body: <p>Here is my bjyauthorize.global.php contents</p>
  
  <pre><code>&lt;?php
  
  return array(
  'bjyauthorize' =&gt; array(
  
      // set the 'guest' role as default (must be defined in a role provider)
      // 'default_role' =&gt; 'guest',
  
      /* this module uses a meta-role that inherits from any roles that should
       * be applied to the active user. the identity provider tells us which
       * roles the "identity role" should inherit from.
       *
       * for ZfcUser, this will be your default identity provider
       */
      'identity_provider' =&gt; 'BjyAuthorize\Provider\Identity\ZfcUserZendDb',
  
      /* If you only have a default role and an authenticated role, you can
       * use the 'AuthenticationIdentityProvider' to allow/restrict access
       * with the guards based on the state 'logged in' and 'not logged in'.
       */
        // 'default_role'       =&gt; 'guest',         // not authenticated
        // 'authenticated_role' =&gt; 'user',          // authenticated
        // 'identity_provider'  =&gt; 'BjyAuthorize\Provider\Identity\AuthenticationIdentityProvider',
  
  
      /* role providers simply provide a list of roles that should be inserted
       * into the Zend\Acl instance. the module comes with two providers, one
       * to specify roles in a config file and one to load roles using a
       * Zend\Db adapter.
       */
      'role_providers' =&gt; array(
  
          /* here, 'guest' and 'user are defined as top-level roles, with
           * 'admin' inheriting from user
           */
          'BjyAuthorize\Provider\Role\Config' =&gt; array(
              'admin' =&gt; array(),
              'guest' =&gt; array()
          ),
  
          // this will load roles from the user_role table in a database
          // format: user_role(role_id(varchar), parent(varchar))
          'BjyAuthorize\Provider\Role\ZendDb' =&gt; array(
              'table'             =&gt; 'user_role',
              'role_id_field'     =&gt; 'roleId',
              'parent_role_field' =&gt; 'parent_id',
          ),
  
          // this will load roles from the 'BjyAuthorize\Provider\Role\Doctrine'
          // service
          // 'BjyAuthorize\Provider\Role\Doctrine' =&gt; array(),
      ),
  
      // resource providers provide a list of resources that will be tracked
      // in the ACL. like roles, they can be hierarchical
      'resource_providers' =&gt; array(
          // 'BjyAuthorize\Provider\Resource\Config' =&gt; array(
          //     'pants' =&gt; array(),
          // ),
  
          'BjyAuthorize\Provider\Resource\Config' =&gt; array(
              'Collections\Controller\CollectionsController' =&gt; array('admin'),
          ),
      ),
  
      /* rules can be specified here with the format:
       * array(roles (array), resource, [privilege (array|string), assertion])
       * assertions will be loaded using the service manager and must implement
       * Zend\Acl\Assertion\AssertionInterface.
       * *if you use assertions, define them using the service manager!*
       */
      'rule_providers' =&gt; array(
          'BjyAuthorize\Provider\Rule\Config' =&gt; array(
              'allow' =&gt; array(
                  // allow guests and users (and admins, through inheritance)
                  // the "wear" privilege on the resource "pants"
                  // array(array('guest', 'user'), 'pants', 'wear')
                  array(array('admin'), 'Collections\Controller\CollectionsController', 'index')
              ),
  
              // Don't mix allow/deny rules if you are using role inheritance.
              // There are some weird bugs.
              'deny' =&gt; array(
                  // ...
                   // array(array('admin', 'guest'), 'collections', 'add')
              ),
          ),
      ),
  
      /* Currently, only controller and route guards exist
       *
       * Consider enabling either the controller or the route guard depending on your needs.
       */
      'guards' =&gt; array(
          /* If this guard is specified here (i.e. it is enabled), it will block
           * access to all controllers and actions unless they are specified here.
           * You may omit the 'action' index to allow access to the entire controller
           */
          'BjyAuthorize\Guard\Controller' =&gt; array(
              array('controller' =&gt; 'index', 'action' =&gt; 'index', 'roles' =&gt; array('admin','guest')),
              array('controller' =&gt; 'index', 'action' =&gt; 'stuff', 'roles' =&gt; array('admin')),
              array('controller' =&gt; 'Collections\Controller\CollectionsController', 'roles' =&gt; array('admin', 'guest')),
  
              // You can also specify an array of actions or an array of controllers (or both)
              // allow "guest" and "admin" to access actions "list" and "manage" on these "index",
              // "static" and "console" controllers
              // array(
              //     'controller' =&gt; array('index', 'static', 'console'),
              //     'action' =&gt; array('list', 'manage'),
              //     'roles' =&gt; array('guest', 'admin')
              // ),
              array('controller' =&gt; 'zfcuser', 'roles' =&gt; array('admin', 'guest')),
              // Below is the default index action used by the ZendSkeletonApplication
              array('controller' =&gt; 'Application\Controller\Index', 'roles' =&gt; array('guest', 'admin')),
          ),
  
          /* If this guard is specified here (i.e. it is enabled), it will block
           * access to all routes unless they are specified here.
           */
          'BjyAuthorize\Guard\Route' =&gt; array(
              array('route' =&gt; 'zfcuser', 'roles' =&gt; array('admin', 'guest')),
              array('route' =&gt; 'zfcuser/logout', 'roles' =&gt; array('admin', 'guest')),
              array('route' =&gt; 'zfcuser/login', 'roles' =&gt; array('admin', 'guest')),
              array('route' =&gt; 'zfcuser/register', 'roles' =&gt; array('guest', 'admin')),
              // Below is the default index action used by    the ZendSkeletonApplicationarray('route' =&gt; 'zfcuser/register', 'roles' =&gt; array('guest', 'admin')),
              array('route' =&gt; 'collections/index', 'roles' =&gt; array('guest', 'admin')),
              array('route' =&gt; 'home', 'roles' =&gt; array('guest', 'admin')),
          ),
      ),
  ),
  );
  </code></pre>
  
  <p>I have a database structures like this:</p>
  
  <pre><code>--
  -- Table structure for table `user`
  --
  
  CREATE TABLE IF NOT EXISTS `user` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `display_name` varchar(50) DEFAULT NULL,
  `password` varchar(128) NOT NULL,
  `state` smallint(5) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`),
  UNIQUE KEY `email` (`email`)
  ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
  
  --
  -- Dumping data for table `user`
  --
  
  INSERT INTO `user` (`id`, `username`, `email`, `display_name`, `password`, `state`) VALUES
  (1, NULL, 'test@test.com', NULL, '$2y$14$fL.K0rieXO.kHsHfOogH8Oaf..C.1GsYqEB49A3Dmxy9ZiMhWHx7.', NULL);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user_role`
  --
  
  CREATE TABLE IF NOT EXISTS `user_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `roleId` varchar(255) NOT NULL,
  `is_default` tinyint(1) NOT NULL,
  `parent_id` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
  ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
  
  --
  -- Dumping data for table `user_role`
  --
  
  INSERT INTO `user_role` (`id`, `roleId`, `is_default`, `parent_id`) VALUES
  (1, 'admin', 1, 'admin'),
  (2, 'guest', 1, 'admin');
  
  -- --------------------------------------------------------
  
  -- 
  -- Table structure for table `user_role_linker`
  --
  
  CREATE TABLE IF NOT EXISTS `user_role_linker` (
  `user_id` int(11) unsigned NOT NULL,
  `role_id` int(11) NOT NULL,
  PRIMARY KEY (`user_id`,`role_id`),
  KEY `role_id` (`role_id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `user_role_linker`
  --
  
  INSERT INTO `user_role_linker` (`user_id`, `role_id`) VALUES
  (1, 1);
  </code></pre>
  
  <p>I have modified column of user table according to this <a href="https://github.com/bjyoungblood/BjyAuthorize/issues/174" rel="nofollow">issue</a>. And I have modified Mapper of <a href="https://github.com/ZF-Commons/ZfcUser" rel="nofollow">ZfcUser</a> for user_id to id. It is working properly because it is not showing any error.</p>
  
  <p>Even though there are no any errors I always get "403 Forbidden" for any module I visit (/user and /collections) except for login page (zfcuser/login) before login.</p>
  
  <p>I have a doubt in database for user_role_linker table's data. I did not find proper documentation to enter roles data for user_role table in <a href="https://github.com/bjyoungblood/BjyAuthorize" rel="nofollow">BjyAuth library</a> . Suggest me is there any mis-configuration in config file or in database tables or anything else that is not mention here.</p>