HomePhabricator
Diffusion Comm 0389fd22a3c2

[lib] validate policies after user login

Description

[lib] validate policies after user login

Summary:
Follow up to: https://phab.comm.dev/D5875#inline-39619.

Diff introduces a hook to check if there is information about not acknowledged policies in login response and dispatch an action if needed.
Additionally, it removes data from the response to not share data with user until acceptance.

Probably I'll wait with landing this until most of the SIWE feature will be ready to test end-to-end how this change works with login using wallet.

Test Plan:

  1. Logout user
  2. Set terms policy as not accepted for user in DB
  3. Login with credentials and separately using SIWE
  4. Login action should finish with success and the modal should show immediately after it. Data about user messages, threads, calendar, etc. should not be present in the login response.
  5. Test for both web/native

Reviewers: inka, przemek, michal, ashoat, atul

Reviewed By: ashoat

Subscribers: ashoat, tomek, atul

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

Details

Provenance
kamilAuthored on Jan 11 2023, 2:39 AM
Reviewer
ashoat
Differential Revision
D6092: [lib] validate policies after user login
Parents
rCOMM32e972023177: [Nix] Add easy way to start/stop localstack
Branches
Unknown
Tags
Unknown