Every bjyauthorize.global file has an 'allow' section which has an array.
'rule_providers' => array(
'BjyAuthorize\Provider\Rule\Config' => array(
'allow' => array(
// allow guests and users (and admins, through inheritance)
// the "wear" privilege on the resource "pants"
array(array('guest', 'user'), 'pants', 'wear')
),
'deny' => array(
// ...
),
),
),
This array contains all the allowed roles. But these roles are hard coded. I just want to return those array sets from table via function. How can i do this??..please advise.....
Hey i have found the answer to this.......this can be simply done by overriding the bjyauthorize rule and resource class. The array which is fed via bjyauthorize.global.php is filtered into its rule and resource class respectively. Instead of hard coding it, simply write your own resource and rule class, and inside its get method, open up a table gateway, connect to DB and bring in the information....:)