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

GTC-2576 Restrict queries on licensed WDPA dataset (2nd try) #451

Merged
merged 4 commits into from
Dec 22, 2023

Conversation

danscales
Copy link
Collaborator

Make the protection correct, now that I understand FastAPI and its dependencies better. The checking for whether the dataset is protected must occur within a dependency function, since only a dependency function for a path handler has access to the bearer token and the dataset name.

Added in protection for GET query/json, GET query/csv, and their less-used POST equivalents.

Make the protection correct, now that I understand FastAPI and its
dependencies better. The checking for whether the dataset is protected
must occur within a dependency function, since only a dependency
function for a path handler has access to the bearer token.

Added in protection for GET query/json, GET query/csv, and
their less-used POST equivalents.
@codecov-commenter
Copy link

codecov-commenter commented Dec 19, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (12bb4f3) 80.29% compared to head (8aec777) 80.28%.

Files Patch % Lines
app/authentication/token.py 70.00% 3 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #451      +/-   ##
===========================================
- Coverage    80.29%   80.28%   -0.02%     
===========================================
  Files          124      124              
  Lines         5502     5509       +7     
===========================================
+ Hits          4418     4423       +5     
- Misses        1084     1086       +2     
Flag Coverage Δ
unittests 80.28% <75.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

app/authentication/token.py Outdated Show resolved Hide resolved
app/authentication/token.py Outdated Show resolved Hide resolved
@danscales danscales merged commit 85ee547 into develop Dec 22, 2023
2 checks passed
@danscales danscales deleted the gtc-2576 branch December 22, 2023 17:45
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.

3 participants