HomePhabricator
Diffusion Comm 38451e4cef66

[reports] Always create AuthorizationCredential directly

Description

[reports] Always create AuthorizationCredential directly

Summary:
Noticed this while testing D10931.
For authenticated endpoints this doesnt matter because they're always behind auth middleware.
But for optionally-authenticated endpoints, the request extensions isn't set by the middleware so it's always None.
Using AuthorizationCredential::from_request() also does the extensions check if possible so it's better to call it instead.

Test Plan: Test plan for D10931

Reviewers: michal

Reviewed By: michal

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D10932

Details

Provenance
bartekAuthored on Feb 2 2024, 1:54 AM
Reviewer
michal
Differential Revision
D10932: [reports] Always create AuthorizationCredential directly
Parents
rCOMMcf34b97ebde6: [web] make useSortedENSResolvedUsers more permissive
Branches
Unknown
Tags
Unknown