-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
When calling addPermissionToRole, if one of the resources is undefined, it would lead to an error
TypeError: Cannot read property 'split' of undefined
at AccessAuthorizer.filterRelevantPermissions (node_modules/@bluejay/access-control/src/classes/access-authorizer.js:60:62)
at AccessAuthorizer.authorize (node_modules/@bluejay/access-control/src/classes/access-authorizer.js:21:42)
at AccessControl.<anonymous> (node_modules/@bluejay/access-control/src/classes/access-control.js:20:42)
You should be able to reproduce by codes like this:
store.addPermissionToRole('some_role', {
id: 'read',
effect: PermissionEffect.ALLOW,
resource: [undefined],
action: ['read']
});
SylvainEstevez
Metadata
Metadata
Assignees
Labels
No labels