Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3500685
D5310.id17381.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
815 B
Referenced Files
None
Subscribers
None
D5310.id17381.diff
View Options
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,19 @@
+// @flow
+import { policyTypes } from 'lib/facts/policies.js';
+
+import { dbQuery, SQL } from '../database/database.js';
+import { main } from './utils.js';
+
+const policy = policyTypes.tosAndPrivacyPolicy;
+// time when policy was officially published for users
+const policyUpdateTime = new Date('2022-10-30T00:00:00').getTime();
+
+async function forcePolicyAcknowledgment() {
+ await dbQuery(SQL`
+ UPDATE policy_acknowledgments
+ SET confirmed = 0
+ WHERE date <= ${policyUpdateTime} AND policy = ${policy};
+ `);
+}
+
+main([forcePolicyAcknowledgment]);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 2:12 AM (17 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2684677
Default Alt Text
D5310.id17381.diff (815 B)
Attached To
Mode
D5310: [keyserver] add script to force users to acknowledge updated policy
Attached
Detach File
Event Timeline
Log In to Comment