我遇到Parent Role id "user" does not exist
错误
我试图让BjyAuthorize工作。在我的配置中,我有
'bjyauthorize' => array(
// Using the authentication identity provider, which basically reads the roles from the auth service's identity
'identity_provider' => 'BjyAuthorize\Provider\Identity\AuthenticationIdentityProvider',
'resource_providers' => [
'BjyAuthorizeProviderResourceConfig' => [
'user' => [],
],
],
'role_providers' => array(
// using an object repository (entity repository) to load all roles into our ACL
'BjyAuthorize\Provider\Role\ObjectRepositoryProvider' => array(
'object_manager' => 'doctrine.entity_manager.orm_default',
'role_entity_class' => 'SorgcaUser\Entity\Role',
),
'BjyAuthorizeProviderResourceConfig' => array(
'allow' => array(
array('user', 'admin', 'manage'),
),
),
),
),
在我的控制器中,我只需拨打$this->isAllowed('admin', 'manage');
现在,调用isAllowed函数会抛出错误,说明我的父角色ID不存在
但是,在我的user_role
表中,我有
我不确定如何开始调试。请指教。