-
Notifications
You must be signed in to change notification settings - Fork 237
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 custom extractor for filtering audit logs #4829
Conversation
879ee5f
to
74be2ac
Compare
let perms = Permission::new(workspace_object.clone(), "approve", user_object.clone()); | ||
let bad_perms = Permission::new(workspace_object, "approve", user_object2); |
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.
cargo fmt
lib/sdf-server/src/extract.rs
Outdated
.uri | ||
.query() | ||
.ok_or(not_found_error("no query string found in uri"))?; | ||
let deserialized = serde_qs::from_str(query).map_err(|err| internal_error(err))?; |
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.
Isn't this a 422?
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.
I mean: shouldn't this produce a 422 and not a 500? If we fail to deserialize it's because the input was invalid
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.
Same with the not found. That's invalid input, not a resource not found
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.
Ah fair point. Will fix
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.
(or maybe 400: Bad Request)
74be2ac
to
7360df4
Compare
7360df4
to
72e7c37
Compare
72e7c37
to
671295a
Compare
This commit adds a custom extractor for filtering audit logs. Generally, it handles array notated query string parameters, which is likely the first time we needed to do so in sdf. Signed-off-by: Nick Gerace <[email protected]>
671295a
to
b7b2611
Compare
Description
This PR adds a custom extractor for filtering audit logs. Generally, it handles array notated query string parameters, which is likely the first time we needed to do so in
sdf
.