Skip to content

authz: check project list endpoints #617

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

Merged
merged 1 commit into from
Jan 21, 2022
Merged

authz: check project list endpoints #617

merged 1 commit into from
Jan 21, 2022

Conversation

davepacheco
Copy link
Collaborator

No description provided.

LookupType::Other("Listing All".to_string()),
)
})
.map_err(public_error_from_diesel_pool_shouldnt_fail)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This change to the error-handling function is sort of unrelated but cleans things up a bit. When the previous code was written, the "shouldnt_fail" function did not exist. We used public_error_from_diesel_pool with parameters that would allow it to generate a 404 if something wasn't found. I don't believe this case was possible. There's no reason this query should ever produce a 404 error, or any other error resulting from bad input or a valid state of the database. That's what the "shouldnt_fail" variant is for -- it produces either a 503 (if there was a problem making the query, either at the network or database level) or a 500 (if any other problem was found -- this would reflect some kind of bug in Nexus).

@davepacheco davepacheco mentioned this pull request Jan 21, 2022
71 tasks
Copy link
Contributor

@teisenbe teisenbe left a comment

Choose a reason for hiding this comment

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

Looks good to me! It's nice seeing the progress on this

@davepacheco davepacheco merged commit e603db7 into main Jan 21, 2022
@davepacheco davepacheco deleted the authz-work branch January 21, 2022 23:33
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.

2 participants