Skip to content
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

Support overriding rules per route #9

Merged
merged 8 commits into from
Jan 9, 2021

Conversation

kibertoad
Copy link
Contributor

@kibertoad kibertoad commented Jan 9, 2021

fixes #2

Ideally should be reviewed and merged after #6 in order to reduce the amount of noise, as it buils upon it.

plugin.js Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Jan 9, 2021

Codecov Report

Merging #9 (edada6d) into master (3a030d4) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master        #9   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           23        26    +3     
=========================================
+ Hits            23        26    +3     
Impacted Files Coverage Δ
plugin.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a030d4...edada6d. Read the comment docs.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
plugin.js Show resolved Hide resolved
Comment on lines +101 to +103
rest: {
getObj: request => request.userId
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this new behavior of the values that casbin.rest can have should be documented in the API section of the README. It was only very briefly shown because the only supported value before was true. I saw you added it below the table of the plugin options but it's worth mentioning more explicitly above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link
Member

@simoneb simoneb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One outstanding comment about docs but otherwise LGTM. Thanks!

@simoneb simoneb merged commit b78a401 into nearform:master Jan 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow customizing entity getters per-route
3 participants