HomePhabricator
Diffusion Comm 22ac9645d0eb

[native] Introduce `StaffContextProvider`

Description

[native] Introduce StaffContextProvider

Summary:
Context: https://linear.app/comm/issue/ENG-2134/have-a-flag-that-indicates-whether-the-build-is-a-staff-release

We want to maintain a staffUserHasBeenLoggedIn value so we know if a staff member is currently, or has previously logged in.

This provider will set staffUserHasBeenLoggedIn to true, but won't do the reverse. Once it's been set to true it will remain true indefinitely.

Test Plan:

  1. Log value of provider
  2. Log into non-staff account
  3. Ensure that staffUserHasBeenLoggedIn is false
  4. Log into a staff account
  5. Ensure that staffUserHasBeenLoggedIn is true
  6. Log back into a non-staff account
  7. Ensure that staffUserHasBeenLoggedIn is still true

95828c.png (858×1 px, 361 KB)

Reviewers: tomek, ginsu, rohan, ashoat, marcin

Reviewed By: ashoat

Subscribers: abosh

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

Details

Provenance
atulAuthored on Nov 1 2022, 11:42 AM
Reviewer
ashoat
Differential Revision
D5513: [native] Introduce `StaffContextProvider`
Parents
rCOMM131f99f35a9c: [native] Introduce `useStaffCanSee()`
Branches
Unknown
Tags
Unknown