Page MenuHomePhabricator

[lib] add legal policies list
ClosedPublic

Authored by kamil on Oct 6 2022, 3:09 AM.
Tags
None
Referenced Files
F2125893: D5306.diff
Thu, Jun 27, 3:12 AM
Unknown Object (File)
Wed, Jun 26, 12:22 AM
Unknown Object (File)
Mon, Jun 17, 3:10 AM
Unknown Object (File)
Mon, Jun 17, 2:55 AM
Unknown Object (File)
Mon, Jun 17, 2:55 AM
Unknown Object (File)
Mon, Jun 17, 2:55 AM
Unknown Object (File)
Mon, Jun 17, 2:54 AM
Unknown Object (File)
Mon, Jun 17, 2:54 AM

Details

Summary

Add hardcoded list of policies that users will need to acknowledge.

If any new policy will be introduced only operation needed will be updating this object.

I decided to use object instead of the only array with string values, maybe in future there will be a need to distinguish between them, make some operations only on one and it will be easier to access (eg. now on running a script and choosing which policy requires re-acknowledge it can be based on object prop).

Test Plan

yarn flow check

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil edited the test plan for this revision. (Show Details)
kamil added a reviewer: atul.
kamil published this revision for review.Oct 6 2022, 4:49 AM

Please address nit before landing

lib/facts/policies.js
2 ↗(On Diff #17376)

Nit: can you add a newline below // @flow, for consistency with the rest of the codebase?

This revision is now accepted and ready to land.Oct 6 2022, 6:11 AM
marcin added a reviewer: tomek.
This revision now requires review to proceed.Oct 11 2022, 11:30 AM
atul added inline comments.
lib/facts/policies.js
5 ↗(On Diff #17376)

Should we add a month/year here? Figure we'll probably change this at some point in the future.

Maybe

tosAndPrivacyPolicyOct2022 = 'TERMS_OF_USE_AND_PRIVACY_POLICY_OCT_2022',

?

lib/facts/policies.js
5 ↗(On Diff #17376)

As designed right now, that's handled by a separate column in the table

add new line below // @flow

lib/facts/policies.js
5 ↗(On Diff #17376)

Should we add a month/year here? Figure we'll probably change this at some point in the future.

Maybe

tosAndPrivacyPolicyOct2022 = 'TERMS_OF_USE_AND_PRIVACY_POLICY_OCT_2022',

?

thanks for suggestion @atul, but you are talking about second solution described here while we decided to stick to first one

This revision is now accepted and ready to land.Oct 12 2022, 3:09 AM
This revision was automatically updated to reflect the committed changes.