-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for passing the model programmatically #3
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 14 14
=========================================
Hits 14 14
Continue to review full report at Codecov.
|
@simoneb Do you think it makes sense to narrow down possible type for enforcerParam? |
Having thought about it more, semver major approach seems more elegant and less complex. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. this will require a major semver bump as modelPath is replaced by model. the change makes sense to me anyway, modelPath was misleading
yeah they're defined like that because there's quite a bit of logic that they apply to the arguments provided to newEnforcer, see https://github.com/casbin/node-casbin/blob/master/src/enforcer.ts#L356. nevertheless, I like the slightly more typed way we do it here, which gives some guidance about how to do it while still keeping lots of the flexibility |
@simoneb Should I do the version bump or you'll do that during the release process? |
I'll bump before release, thanks |
fixes #2
(this seems not to work, fixing now)