From 1f56dae4ae1accd9862c904e3cd216fa42c16842 Mon Sep 17 00:00:00 2001 From: bmcgonag Date: Sun, 29 Mar 2020 09:23:07 -0500 Subject: [PATCH] Removed a config I wanted to add, but didn't make sense. --- client/Admin/adminAllowOtherUsers.html | 17 ----------------- client/Admin/adminAllowOtherUsers.js | 8 -------- client/Admin/adminConfig.js | 14 ++------------ imports/api/configuration.js | 9 ++------- server/main.js | 2 +- 5 files changed, 5 insertions(+), 45 deletions(-) diff --git a/client/Admin/adminAllowOtherUsers.html b/client/Admin/adminAllowOtherUsers.html index b0c2729..9c64214 100644 --- a/client/Admin/adminAllowOtherUsers.html +++ b/client/Admin/adminAllowOtherUsers.html @@ -52,23 +52,6 @@ {{/if}} - {{#if $eq allowOwnNetwork false}} -
-
- Disallow Inter-client Communication -
-
-
- -
-
-
- {{/if}} {{/if}} diff --git a/client/Admin/adminAllowOtherUsers.js b/client/Admin/adminAllowOtherUsers.js index 95ae229..f0b1270 100644 --- a/client/Admin/adminAllowOtherUsers.js +++ b/client/Admin/adminAllowOtherUsers.js @@ -46,12 +46,4 @@ Template.adminAllowOtherUsers.events({ console.log("allow own: " + allowOwnNetwork); Session.set("allowOwnNetwork", allowOwnNetwork); }, - 'click #disallowCom' (event) { - Session.set("confirmationDialogTitle", "NOTICE"); - Session.set("confirmationDialogContent", "Changing the Disallow Inter-Communication value after clients have been created with a specific value set, will not update the functionality of existing clients!"); - Session.set("eventConfirmCallBackFunction", ""); - Session.set("eventConfirmNecessaryId", "disallowCom"); - - $("#genModal").modal('open'); - } }); \ No newline at end of file diff --git a/client/Admin/adminConfig.js b/client/Admin/adminConfig.js index 9ebf149..057acd5 100644 --- a/client/Admin/adminConfig.js +++ b/client/Admin/adminConfig.js @@ -44,7 +44,6 @@ Template.adminConfig.events({ let maxNoNets = $("#maxNetworks").val(); let logMore = $("#logMore").prop('checked'); let logLevel = $("#logLevel").val(); - let disallowCom = $("#disallowCom").prop('checked'); if (allowOwnNetwork == null || allowOthers == false) { allowOwnNetwork = false; @@ -66,11 +65,7 @@ Template.adminConfig.events({ logLevel = ""; } - if (disallowCom == null || disallowCom == "") { - disallowCom = false; - } - - Meteor.call("new.config", host, user, pass, server, portNo, allowOthers, maxNoInts, allowOwnNetwork, maxNoNets, logMore, logLevel, disallowCom, function(err, result) { + Meteor.call("new.config", host, user, pass, server, portNo, allowOthers, maxNoInts, allowOwnNetwork, maxNoNets, logMore, logLevel, function(err, result) { if (err) { console.log("Error adding email configuration: " + err); showSnackbar("Error Adding Email Configuration!", "red"); @@ -94,7 +89,6 @@ Template.adminConfig.events({ let maxNoNets = $("#maxNetworks").val(); let logMore = $("#logMore").prop('checked'); let logLevel = $("#logLevel").val(); - let disallowCom = $("#disallowCom").prop('checked'); if (allowOwnNetwork == null || allowOthers == false) { allowOwnNetwork = false; @@ -116,11 +110,7 @@ Template.adminConfig.events({ logLevel = ""; } - if (disallowCom == null || disallowCom == "") { - disallowCom = false; - } - - Meteor.call("edit.config", host, user, pass, server, portNo, allowOthers, maxNoInts, allowOwnNetwork, maxNoNets, logMore, logLevel, disallowCom, function(err, result) { + Meteor.call("edit.config", host, user, pass, server, portNo, allowOthers, maxNoInts, allowOwnNetwork, maxNoNets, logMore, logLevel, function(err, result) { if (err) { console.log("Error editing email configuration: " + err); showSnackbar("Error Editing Email Configuration!", "red"); diff --git a/imports/api/configuration.js b/imports/api/configuration.js index 57788ca..04a8689 100644 --- a/imports/api/configuration.js +++ b/imports/api/configuration.js @@ -12,7 +12,7 @@ Configuration.allow({ }); Meteor.methods({ - 'new.config' (emailHost, emailUser, emailPassword, emailSmtpServer, emailSmtpPort, allowOthers, maxNumberInterfaces, allowOwnNetwork, maxNumberNetworks, logMore, logLevel, disallowCom) { + 'new.config' (emailHost, emailUser, emailPassword, emailSmtpServer, emailSmtpPort, allowOthers, maxNumberInterfaces, allowOwnNetwork, maxNumberNetworks, logMore, logLevel) { check(emailHost, String); check(emailUser, String); check(emailPassword, String); @@ -24,7 +24,6 @@ Meteor.methods({ check(maxNumberNetworks, Number); check(logMore, Boolean); check(logLevel, String); - check(disallowCom, Boolean); return Configuration.insert({ emailHost: emailHost, @@ -38,11 +37,10 @@ Meteor.methods({ maxNumberNetworks: maxNumberNetworks, logMore: logMore, logLevel: logLevel, - disallowCom: disallowCom, addedOn: new Date(), }); }, - 'edit.config' (emailHost, emailUser, emailPassword, emailSmtpServer, emailSmtpPort, allowOthers, maxNumberInterfaces, allowOwnNetwork, maxNumberNetworks, logMore, logLevel, disallowCom) { + 'edit.config' (emailHost, emailUser, emailPassword, emailSmtpServer, emailSmtpPort, allowOthers, maxNumberInterfaces, allowOwnNetwork, maxNumberNetworks, logMore, logLevel) { check(emailHost, String); check(emailUser, String); check(emailPassword, String); @@ -54,8 +52,6 @@ Meteor.methods({ check(maxNumberNetworks, Number); check(logMore, Boolean); check(logLevel, String); - check(disallowCom, Boolean); - if (!this.userId) { throw new Meteor.Error('User is not allowed to setup admin values, make sure you are logged in.'); @@ -78,7 +74,6 @@ Meteor.methods({ maxNumberNetworks: maxNumberNetworks, logMore: logMore, logLevel: logLevel, - disallowCom: disallowCom, addedOn: new Date(), addedBy: Meteor.user().emails[0].address, } diff --git a/server/main.js b/server/main.js index af6bb83..0537c52 100644 --- a/server/main.js +++ b/server/main.js @@ -11,7 +11,7 @@ Meteor.startup(() => { let Configs = Configuration.findOne({}); if (typeof Configs == 'undefined') { - Meteor.call('new.config', "", "", "", "", "", false, 0, false, 0, false, "", false, function(err, result) { + Meteor.call('new.config', "", "", "", "", "", false, 0, false, 0, false, "", function(err, result) { if (err) { console.log("Error setting initial configuration: " + err); } else {