onury / accesscontrol

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

(feat) Allow `number` as valid role and grant type (fixes #93) #94

Open vegerot opened 3 years ago

vegerot commented 3 years ago

In some cases it makes sense to have numbers instead of strings for role types. For example, when using enums in TypeScript

Fixes #93

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.04%) to 96.907% when pulling 0b40633bbb8182d2d937da6dcd2e110655464edc on vegerot:valid_number_role into c91eb6796b4a0e127a99b26f2fceb54d1f3353d4 on onury:master.