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

feat!: authorization support for some (mostly "Bento Public") endpoints #529

Merged
merged 71 commits into from
Sep 9, 2024

Conversation

davidlougheed
Copy link
Member

No description provided.

Copy link

codecov bot commented Aug 7, 2024

Codecov Report

Attention: Patch coverage is 98.25784% with 10 lines in your changes missing coverage. Please review.

Project coverage is 89.43%. Comparing base (0346ef7) to head (a7b7a5f).
Report is 74 commits behind head on develop.

Files with missing lines Patch % Lines
chord_metadata_service/chord/views_search.py 90.00% 2 Missing ⚠️
chord_metadata_service/discovery/utils.py 98.14% 1 Missing and 1 partial ⚠️
chord_metadata_service/patients/api_views.py 96.29% 1 Missing and 1 partial ⚠️
chord_metadata_service/phenopackets/summaries.py 85.71% 1 Missing and 1 partial ⚠️
chord_metadata_service/authz/permissions.py 95.65% 1 Missing ⚠️
chord_metadata_service/discovery/fields.py 91.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #529      +/-   ##
===========================================
+ Coverage    88.63%   89.43%   +0.80%     
===========================================
  Files          131      134       +3     
  Lines         4830     5094     +264     
  Branches       714      748      +34     
===========================================
+ Hits          4281     4556     +275     
+ Misses         395      386       -9     
+ Partials       154      152       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@davidlougheed
Copy link
Member Author

@v-rocheleau still work to be done, but requesting an initial look at this code

@davidlougheed davidlougheed marked this pull request as ready for review September 5, 2024 15:42
Copy link
Contributor

@v-rocheleau v-rocheleau left a comment

Choose a reason for hiding this comment

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

Small questions, otherwise looks good!

Comment on lines 174 to 178
discovery: DiscoveryConfig,
request: DrfRequest,
dt_permissions: DataTypeDiscoveryPermissions,
queryset: QuerySet,
scope_repr: str, # We pass disc
Copy link
Contributor

Choose a reason for hiding this comment

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

discovery and scope_repr arguments are derived from the same ValidatedDiscoveryScope instance.
Might be better to replace those 2 params with a single ValidatedDiscoveryScope param, otherwise someone could theoretically pass a discovery and scope_repr that don't belong together.

Copy link
Member Author

Choose a reason for hiding this comment

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

this was to avoid having to deal with EmptyConfig type in two places, since scopes can return empty configs. but yeah, i agree this also isn't the best (and the comment is truncated/unfinished)

chord_metadata_service/phenopackets/summaries.py Outdated Show resolved Hide resolved
chord_metadata_service/experiments/summaries.py Outdated Show resolved Hide resolved
Copy link
Contributor

@v-rocheleau v-rocheleau left a comment

Choose a reason for hiding this comment

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

LGTM!

@davidlougheed davidlougheed merged commit 72437c0 into develop Sep 9, 2024
7 checks passed
@davidlougheed davidlougheed deleted the feat/partial-auth-middleware branch September 9, 2024 19:23
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