HomePhabricator
Diffusion Comm 328b5c5d0af4

[keyserver] add logic to update acknowledgment table

Description

[keyserver] add logic to update acknowledgment table

Summary:
The function should be called after detecting login from a proper source.

Functionality:

  • a. if there is no record with the given user and policy it means that this is a new one - so It adds a new row
  • b. if there is a record with a given user and policy but confirmed is set to 0 it means that policy was updated, so it updated confirmed and date
  • c. in any other case do nothing

Test Plan:
Check if described in Summary logic works for:

  1. new policy
  2. updated policy
  3. policy accepted by user previously

Reviewers: atul, marcin, ashoat, tomek

Reviewed By: marcin, ashoat, tomek

Subscribers: ashoat, atul, abosh

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

Details

Provenance
kamilAuthored on Nov 16 2022, 6:28 AM
Reviewer
marcin
Differential Revision
D5311: [keyserver] add logic to update acknowledgment table
Parents
rCOMMb987bdc86942: [keyserver] add migration to populate `policy_acknowledgments` table
Branches
Unknown
Tags
Unknown