onury / accesscontrol

Role and Attribute based Access Control for Node.js
https://onury.io/accesscontrol
MIT License
2.21k stars 178 forks source link

return !granted to unknown role #59

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi, is there a constraint to trigger an exception on an unknown role instead of returning false to granted method ?

Thanks

onury commented 6 years ago

An "unknown role" shouldn't get there in the first place. If you mean a denied role; then you can throw if you like but it'd not be friendly. If I'm getting you right...