From 98e3b0ce77cc8c7367fc9cf592f4d6698d16e7f0 Mon Sep 17 00:00:00 2001 From: guillaume Date: Tue, 30 Jul 2019 11:57:21 +0200 Subject: Add admin setting to prevent users to self deleting their account --- models/accountSettings.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'models') diff --git a/models/accountSettings.js b/models/accountSettings.js index c68e905c..ed1087ca 100644 --- a/models/accountSettings.js +++ b/models/accountSettings.js @@ -68,6 +68,15 @@ if (Meteor.isServer) { }, }, ); + AccountSettings.upsert( + { _id: 'accounts-allowUserDelete' }, + { + $setOnInsert: { + booleanValue: false, + sort: 0, + }, + }, + ); }); } -- cgit v1.2.3-1-g7c22