mirror of
https://github.com/fastapi/fastapi.git
synced 2026-09-14 13:36:21 +08:00
🐛 Fix hierarchical security scope propagation (#5624)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com> Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com> Co-authored-by: svlandeg <svlandeg@github.com> Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
c6487ed632
commit
378ad688b7
@@ -278,7 +278,9 @@ def get_dependant(
|
||||
use_security_scopes = security_scopes or []
|
||||
if isinstance(param_details.depends, params.Security):
|
||||
if param_details.depends.scopes:
|
||||
use_security_scopes.extend(param_details.depends.scopes)
|
||||
use_security_scopes = use_security_scopes + list(
|
||||
param_details.depends.scopes
|
||||
)
|
||||
sub_dependant = get_dependant(
|
||||
path=path,
|
||||
call=param_details.depends.dependency,
|
||||
|
||||
Reference in New Issue
Block a user