Page MenuHomePhabricator

D5310.id18524.diff
No OneTemporary

D5310.id18524.diff

diff --git a/keyserver/src/scripts/force-policy-acknowledgment.js b/keyserver/src/scripts/force-policy-acknowledgment.js
new file mode 100644
--- /dev/null
+++ b/keyserver/src/scripts/force-policy-acknowledgment.js
@@ -0,0 +1,20 @@
+// @flow
+
+import { policyTypes } from 'lib/facts/policies.js';
+
+import { dbQuery, SQL } from '../database/database.js';
+import { main } from './utils.js';
+
+// time when policy was officially published for users
+const policyUpdateTime = new Date('2022-12-30T00:00:00').getTime();
+
+async function forcePolicyAcknowledgment() {
+ await dbQuery(SQL`
+ UPDATE policy_acknowledgments
+ SET confirmed = 0
+ WHERE date <= ${policyUpdateTime}
+ AND policy = ${policyTypes.tosAndPrivacyPolicy}
+ `);
+}
+
+main([forcePolicyAcknowledgment]);

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 2:02 AM (17 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2682623
Default Alt Text
D5310.id18524.diff (792 B)

Event Timeline