Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Set dependant security scopes if dependency_overrides is set#1549

Merged
tiangolo merged 2 commits into
fastapi:masterfrom
andrew222651:patch-1
Jun 14, 2020
Merged

Set dependant security scopes if dependency_overrides is set#1549
tiangolo merged 2 commits into
fastapi:masterfrom
andrew222651:patch-1

Conversation

@andrew222651

@andrew222651 andrew222651 commented Jun 11, 2020

Copy link
Copy Markdown
Contributor

This change follows the precedent of https://github.com/tiangolo/fastapi/blob/master/fastapi/dependencies/utils.py#L152

Alternatively, security_scopes could be set within get_dependant (within the Dependant constructor).

This should fix/related to #737

@codecov

codecov Bot commented Jun 11, 2020

Copy link
Copy Markdown

Codecov Report

Merging #1549 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            master     #1549    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          227       236     +9     
  Lines         6810      7053   +243     
==========================================
+ Hits          6810      7053   +243     
Impacted Files Coverage Δ
fastapi/dependencies/utils.py 100.00% <100.00%> (ø)
tests/test_dependency_security_overrides.py 100.00% <100.00%> (ø)
tests/main.py 100.00% <0.00%> (ø)
fastapi/params.py 100.00% <0.00%> (ø)
fastapi/routing.py 100.00% <0.00%> (ø)
fastapi/encoders.py 100.00% <0.00%> (ø)
fastapi/applications.py 100.00% <0.00%> (ø)
fastapi/openapi/docs.py 100.00% <0.00%> (ø)
fastapi/openapi/utils.py 100.00% <0.00%> (ø)
tests/test_application.py 100.00% <0.00%> (ø)
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 543ef77...b840408. Read the comment docs.

@andrew222651 andrew222651 changed the title Fix #737 Set dependant security scopes if dependency_overrides is set Jun 11, 2020
@tiangolo tiangolo merged commit 7dd8813 into fastapi:master Jun 14, 2020
@tiangolo

Copy link
Copy Markdown
Member

Awesome! Great job finding the fix! 🐛 🕵️ 🔍

I just added tests for it and we're now good to go 👌

Thanks for your contribution! 🚀 🍰

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