diff options
author | New Tobin Paradigm <email@mattatobin.com> | 2018-04-12 07:33:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-12 07:33:58 -0400 |
commit | 706493af4e0f67bffdcc77a5c21fb26a0aa43afe (patch) | |
tree | 83212fa3f199e8ee7fdf3b11c3b732832a42b24f /application/palemoon/components | |
parent | 8c19f94d2957ad41aa11ceb31792e3b6b35b05e2 (diff) | |
parent | 33f860b25e1db06f18d06eba9fcdd2de895d9dbc (diff) | |
download | UXP-706493af4e0f67bffdcc77a5c21fb26a0aa43afe.tar UXP-706493af4e0f67bffdcc77a5c21fb26a0aa43afe.tar.gz UXP-706493af4e0f67bffdcc77a5c21fb26a0aa43afe.tar.lz UXP-706493af4e0f67bffdcc77a5c21fb26a0aa43afe.tar.xz UXP-706493af4e0f67bffdcc77a5c21fb26a0aa43afe.zip |
Merge pull request #125 from janekptacijarabaci/pm_loginManager_1
[PALEMOON] Fix Login Manager (Prompter) - basic
Diffstat (limited to 'application/palemoon/components')
-rw-r--r-- | application/palemoon/components/preferences/security.js | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/application/palemoon/components/preferences/security.js b/application/palemoon/components/preferences/security.js index a337f398c..56664bf66 100644 --- a/application/palemoon/components/preferences/security.js +++ b/application/palemoon/components/preferences/security.js @@ -3,6 +3,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +XPCOMUtils.defineLazyModuleGetter(this, "LoginHelper", + "resource://gre/modules/LoginHelper.jsm"); + Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); var gSecurityPane = { @@ -141,7 +144,7 @@ var gSecurityPane = { */ _initMasterPasswordUI: function () { - var noMP = !this._masterPasswordSet(); + var noMP = !LoginHelper.isMasterPasswordSet(); var button = document.getElementById("changeMasterPassword"); button.disabled = noMP; @@ -151,26 +154,6 @@ var gSecurityPane = { }, /** - * Returns true if the user has a master password set and false otherwise. - */ - _masterPasswordSet: function () - { - const Cc = Components.classes, Ci = Components.interfaces; - var secmodDB = Cc["@mozilla.org/security/pkcs11moduledb;1"]. - getService(Ci.nsIPKCS11ModuleDB); - var slot = secmodDB.findSlotByName(""); - if (slot) { - var status = slot.status; - var hasMP = status != Ci.nsIPKCS11Slot.SLOT_UNINITIALIZED && - status != Ci.nsIPKCS11Slot.SLOT_READY; - return hasMP; - } else { - // XXX I have no bloody idea what this means - return false; - } - }, - - /** * Enables/disables the master password button depending on the state of the * "use master password" checkbox, and prompts for master password removal if * one is set. |