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

No error check when missing entity

Open ericuldall opened this issue 3 years ago • 2 comments

If doing a permissions check on a route that may be accessed by a logged out user there is no check for the error flag. https://github.com/feathersjs-ecosystem/feathers-permissions/blob/release/lib/index.js#L33

This causes an issue because currently I'm using permissions check in users before hooks with error false. This makes it easier than implementing it on every method except POST (which you would obviously be logged out for in the event of a new registration).

Is there some reason the error check is not implemented there?

ericuldall avatar Feb 08 '22 01:02 ericuldall

Sent a PR if there's no objection to it.

ericuldall avatar Feb 08 '22 01:02 ericuldall

Just realized this issue was closed as stale before but I think the OP had a valid point and happy to further the discussion. https://github.com/feathersjs-ecosystem/feathers-permissions/issues/71

ericuldall avatar Feb 08 '22 01:02 ericuldall