diff --git a/www/common/application_config_internal.js b/www/common/application_config_internal.js index 513d64924..49be02723 100644 --- a/www/common/application_config_internal.js +++ b/www/common/application_config_internal.js @@ -40,8 +40,6 @@ define(function() { config.notificationTimeout = 5000; config.disableUserlistNotifications = false; - config.enablePinning = true; - // Update the default colors available in the whiteboard application config.whiteboardPalette = [ '#000000', // black diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index b0ac60d38..68921594b 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -258,7 +258,7 @@ define([ })); } - if (common.isLoggedIn() && AppConfig.enablePinning) { + if (common.isLoggedIn()) { // check the size of this file... var bytes = 0; NThen(function (waitFor) { diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index c9d070863..9156c2639 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -47,8 +47,6 @@ define([ account: {}, }; - var PINNING_ENABLED = AppConfig.enablePinning; - // COMMON common.getLanguage = function () { return Messages._languageUsed; @@ -1486,23 +1484,6 @@ define([ console.log('onLogout: disconnect'); postMessage("DISCONNECT"); }); - - if (PINNING_ENABLED && LocalStore.isLoggedIn()) { - console.log("logged in. pads will be pinned"); - postMessage("INIT_RPC", null, waitFor(function (obj) { - console.log('RPC handshake complete'); - if (obj.error) { return; } - localStorage[Constants.plan] = obj.plan; - })); - } else if (PINNING_ENABLED) { - console.log('not logged in. pads will not be pinned'); - } else { - console.log('pinning disabled'); - } - - postMessage("INIT_ANON_RPC", null, waitFor(function () { - console.log('Anonymous RPC ready'); - })); }).nThen(function (waitFor) { if (sessionStorage.createReadme) { var data = { diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index 2d21cc18c..eb43dcfe8 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -312,6 +312,7 @@ define([ }; Store.initRpc = function (clientId, data, cb) { + if (!store.loggedIn) { return cb(); } if (store.rpc) { return void cb(account); } require(['/common/pinpad.js'], function (Pinpad) { Pinpad.create(store.network, store.proxy, function (e, call) { @@ -1670,6 +1671,7 @@ define([ }); }); Store.initAnonRpc(null, null, waitFor()); + Store.initRpc(null, null, waitFor()); }).nThen(function (waitFor) { postMessage(clientId, 'LOADING_DRIVE', { state: 3 diff --git a/www/common/outer/userObject.js b/www/common/outer/userObject.js index 10e30ba95..12771fd92 100644 --- a/www/common/outer/userObject.js +++ b/www/common/outer/userObject.js @@ -66,7 +66,7 @@ define([ } // Add the folder - if (!loggedIn || !AppConfig.enablePinning || config.testMode) { + if (!loggedIn || config.testMode) { return void cb("EAUTH"); } var id = Util.createRandomInteger(); diff --git a/www/common/toolbar3.js b/www/common/toolbar3.js index 86b94ca16..a028ec17f 100644 --- a/www/common/toolbar3.js +++ b/www/common/toolbar3.js @@ -834,7 +834,6 @@ MessengerUI, Messages) { }; var createLimit = function (toolbar) { - if (!Config.enablePinning) { return; } var $limitIcon = $('', {'class': 'fa fa-exclamation-triangle'}); var $limit = toolbar.$userAdmin.find('.'+LIMIT_CLS).attr({ 'title': Messages.pinLimitReached