sequelize-adapter
sequelize-adapter copied to clipboard
feat: Filtered policy support
Support for Filtered Policy
Why?
In certain implementations, the casbin rule data store gets quite large for ABAC in an enterprise solution. I would love to be able to use the sequelize adapter with filtered policies in order to load policies by client domains, for example.
What this should do
- Added one new method called
loadFilteredPolicy
according to the casbin adapter documentation - Added a test for loading a filtered policy
- Added
"es6": true
to the.eslintrc
to supportawait Promise.all()
. Although I'm happy to revise this to use the syntax of choice. - Moved an
await
statement intestGetPolicy
so that you can actually read the policy in the logs during testing: before:after:
How to test
yarn test
:
@Gabriel-403 @Zxilly @kingiw @nodece please review
@kingiw @nodece or @Gabriel-403 any thoughts about this?
lgtm
@rogersgt can you fix the issue caused by this PR? https://github.com/node-casbin/sequelize-adapter/issues/65
could it be because of setiing "es6": true
?
:tada: This PR is included in version 2.4.0 :tada:
The release is available on:
-
npm package (@latest dist-tag)
- GitHub release
Your semantic-release bot :package::rocket: