每个 bjyauthorize.global 文件都有一个“允许”部分,其中包含一个数组。
'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(
// ...
),
),
),
该数组包含所有允许的角色。但是这些角色是硬编码的。我只想通过函数从表中返回这些数组集。我该怎么做??..请指教.....