HomePhabricator
Diffusion Comm 4ce42818a18f

[keyserver] refactor JSON endpoints to require policy acknowledgment

Description

[keyserver] refactor JSON endpoints to require policy acknowledgment

Summary:
This code modifies POST request type, each of them will need to specify an array of needed policies, that will be checked before accessing endpoint. An empty array means that this endpoint doesn't need acknowledgment or information about a missing acknowledgments will be attached to the response later on. Looks like other handlers, e.g. for GET requests don't need to check for policies, there is no need to complicate this because this change will still make users unable to use the app without accepting what's needed.

Context in ENG-2363.

Test Plan: Endpoints should maintain old functionality, this is just a refactor.

Reviewers: tomek, atul, ashoat

Reviewed By: tomek, ashoat

Subscribers: ashoat

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

Details

Provenance
kamilAuthored on Dec 2 2022, 4:10 AM
Reviewer
tomek
Differential Revision
D5823: [keyserver] refactor JSON endpoints to require policy acknowledgment
Parents
rCOMMc389d36abeaf: [keyserver] add viewer acknowledgment fetcher
Branches
Unknown
Tags
Unknown