From 8402fbfedef096270763884746e19ae9ca12e5ea Mon Sep 17 00:00:00 2001 From: "morse%netscape.com" Date: Tue, 29 May 2001 22:02:15 +0000 Subject: [PATCH] bug 82703, need password for edit menu, r=cmanske, sr=alecf, a=selmer/blizzard/asa git-svn-id: svn://10.0.0.236/trunk@96011 18797224-902f-48f8-a5cc-f745e15eee43 --- .../wallet/resources/content/walletOverlay.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/mozilla/extensions/wallet/resources/content/walletOverlay.js b/mozilla/extensions/wallet/resources/content/walletOverlay.js index ebdc9e3f9f0..cd64e3aeb3f 100644 --- a/mozilla/extensions/wallet/resources/content/walletOverlay.js +++ b/mozilla/extensions/wallet/resources/content/walletOverlay.js @@ -174,6 +174,24 @@ if (type != "select-one") { elementCount++; } + + /* If database is encrypted and user has not yet supplied master password, + * we won't be able to access the data. In that case, enable the item rather + * than asking user for password at this time. Otherwise you'll be asking for + * the password whenever user clicks on edit menu or context menu + */ + try { + if (this.pref.GetBoolPref("wallet.crypto")) { + // database is encrypted, see if it is still locked +// if (locked) { -- there's currently no way to make such a test + // it's encrypted and locked, we lose + return enable; +// } + } + } catch(e) { + // there is no crypto pref so database could not possible be encrypted + } + if (bestState == hide) { bestState = disable; }