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.....
Alright. There probably various ways to achieve this and I am pretty sure you'll run into troubles here and there but you could override the config within your onBootstrap method in the module.php.
From here on you should be fine, just get the information from your db and override
$config['bjyauthorize']['rule_providers']with your roles from the db.Edit: I'am not to familiar with the bjyauthorize module but im pretty sure it has methods to Add or remove ACL entries. It prob be a good idea peeking into the modules code and see if you can find any and/or it provides any method's within it's service. If it does it probably is a way better solution then overriding the config.