Context
We previously implemented support of tracking which version of the Terms of Use a manager accepted and when: T401165
We need similar version tracking for the Hosting Policy.
Important caveat: the 1st version of the hosting policy will come into force later, so there is nothing to actually track yet. In this story, we make the necessary preparations, so that once the policy comes into force, we could simply flip the switch and start collecting real auditable acceptance data.
User Story
As a platform operator,
I want the system to store which version of the Hosting Policy an instance manager accepted and when,
So that we have an auditable record of HP acceptance per manager, and can enforce future policy changes.
Acceptance Criteria
- The platform supports Hosting Policy versioning and allows configuring one active version of the policy.
- If an active Hosting Policy is configured,
- When a new manager account is created via the registration flow, the system stores:
- The timestamp of HP acceptance
- The active HP version ID (we use a date string for this purpose)
- This data is saved at the manager profile level.
- The HP acceptance data is easily retrievable via database queries.
- When a new manager account is created via the registration flow, the system stores:
- As long as no active Hosting Policy is configured,
- no acceptance data for the hosting policy is saved when creating a manager profile.
- When this ticket is shipped to production, no active hosting policies are configured, so no real users are affected.
- There is a way to test the behavior for the situation when the active hosting policy would be configured, without affecting real users (for example, on a separate environment where a stub HP policy is configured as 'active', or through some developer flag).
Notes
- Same functionality was previously implemented for the ToU in T401165: the current version of the policy is configured in tou_versions and acceptance data is tracked in tou_acceptances.
- This is a backend ticket only, no UI is affected.