feathers-permissions icon indicating copy to clipboard operation
feathers-permissions copied to clipboard

Is NULL a valid value for the permissions field?

Open sokulski opened this issue 3 years ago • 0 comments

At present, I suspect that NULL is not a valid value for the permissions field. When that field is set to NULL I get the following error:

Cannot read property 'some' of null

In my application, a majority of users will have only a basic set of permissions over their own content. I had planned to leave permissions blank for them, but instead it seems I'll need to give them a basic "user" permission to satisfy this need.

In the future, it'd be neat if the hook could fail out (based on the value of the error parameter) when there are no roles to check.

sokulski avatar Mar 23 '21 01:03 sokulski