Add PIPL email sent timestamp

What does this MR do and why?

Related Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/455709

This MR introduces the functionality for PIPL compliance, more specifically the following cases were added:

User is identified as PIPL compliant (Free User && Accessing from PIPL compliant country)

  • Send an email notification and store the notification timestamp

User Accessed from a non compliant country or User Becomes Paid

  • Reset their timestamp to stop the countdown

These changes are introduced under a feature flag but we exclude the code from the FF when resetting the timestamp because in case we disable the feature flag and a user's been flagged, they won't be able to reset the timestamp in case their state changes to a non PIPL-Compliant one

How to set up and validate locally

I am not aware of a way to spoof the location of a user on the dev environment, so we only test through specs.

Merge request reports

Loading