-
Notifications
You must be signed in to change notification settings - Fork 30
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
Reject if #199
Conversation
This acts like the opposite of `check if`: if there is a match, then authorization fails. Using `reject if` raises the block version to 5
The file contained trailing slashes that made rustfmt crash
let mut contains_check_all = false; | ||
let mut contains_reject_if = false; | ||
|
||
for c in checks.iter() { |
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.
Couldn't be simplified with a contains
?
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.
we are setting two separate flags, so using contains
(or any
as before) would require traversing the list twice.
See biscuit-auth/biscuit#141
This adds
reject if
support to the parser as well as the serialization layer, raising the block version to 5 when used.This PR does not introduce an equivalent to
reject if all
because i'm not sure what it would look like and whether it would be useful.