Bug #255451 --> Add support for master password to Thunderbid.
git-svn-id: svn://10.0.0.236/trunk@160720 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
2742b9dbf4
commit
465b4e5592
@ -97,7 +97,6 @@ pref("update.severity", 0);
|
||||
pref("update.extensions.count", 0);
|
||||
pref("xpinstall.whitelist.add", "update.mozilla.org");
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// Overrides of the seamonkey suite mailnews.js prefs
|
||||
/////////////////////////////////////////////////////////////////
|
||||
@ -289,7 +288,7 @@ pref("javascript.options.showInConsole", true);
|
||||
pref("network.enableIDN", false); // Turn on/off IDN (Internationalized Domain Name) resolution
|
||||
pref("wallet.captureForms", true);
|
||||
pref("wallet.enabled", true);
|
||||
pref("wallet.crypto", false);
|
||||
pref("wallet.crypto", true); // needs to be enabled for the master password to work
|
||||
pref("wallet.crypto.autocompleteoverride", false); // Ignore 'autocomplete=off' - available only when wallet.crypto is enabled.
|
||||
pref("wallet.namePanel.hide", false);
|
||||
pref("wallet.addressPanel.hide", false);
|
||||
|
||||
@ -165,6 +165,11 @@ function editPasswords()
|
||||
window.openDialog("chrome://communicator/content/wallet/SignonViewer.xul","_blank","chrome,centerscreen,resizable=yes", "S");
|
||||
}
|
||||
|
||||
function editMasterPassword()
|
||||
{
|
||||
window.openDialog("chrome://messenger/content/pref-masterpass.xul","_blank","chrome,centerscreen,resizable=yes", "masterPassword");
|
||||
}
|
||||
|
||||
function checkForUpdates()
|
||||
{
|
||||
var updates = Components.classes["@mozilla.org/updates/update-service;1"]
|
||||
|
||||
@ -166,6 +166,12 @@
|
||||
id="viewStoredPassword"
|
||||
prefstring="pref.advanced.password.disable_button.view_stored_password"/>
|
||||
</hbox>
|
||||
|
||||
<hbox id="masterPasswordMgr" align="center" pack="end">
|
||||
<label class="expanderDescription" value="&masterPasswordDesc.label;" flex="1"/>
|
||||
<button label="&masterPassword.label;" accesskey="&masterPassword.accesskey;"
|
||||
oncommand="editMasterPassword();"/>
|
||||
</hbox>
|
||||
</expander>
|
||||
|
||||
<!-- Email Collection -->
|
||||
|
||||
101
mozilla/mail/components/prefwindow/content/pref-masterpass.xul
Normal file
101
mozilla/mail/components/prefwindow/content/pref-masterpass.xul
Normal file
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
|
||||
<!DOCTYPE dialog [
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
|
||||
%brandDTD;
|
||||
<!ENTITY % masterPassDTD SYSTEM "chrome://messenger/locale/pref-masterpass.dtd" >
|
||||
%masterPassDTD;
|
||||
]>
|
||||
|
||||
<dialog id="masterPassword"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&dialog.title;"
|
||||
onload="onLoad();"
|
||||
ondialogaccept="return onAccept();">
|
||||
|
||||
<script type="application/x-javascript" src="chrome://pippki/content/pref-masterpass.js"/>
|
||||
<script>
|
||||
<![CDATA[
|
||||
var gPrefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
|
||||
|
||||
function onLoad()
|
||||
{
|
||||
var el = document.getElementById('passwordTimeout');
|
||||
el.setAttribute("value", gPrefService.getIntPref(el.getAttribute("prefstring")) );
|
||||
|
||||
el = document.getElementById('passwordAskTimes');
|
||||
el.selectedItem = el.getElementsByAttribute('value', gPrefService.getIntPref(el.getAttribute("prefstring")))[0];
|
||||
|
||||
onMasterPasswordLoad();
|
||||
}
|
||||
|
||||
function onAccept()
|
||||
{
|
||||
var el = document.getElementById('passwordAskTimes');
|
||||
gPrefService.setIntPref(el.getAttribute("prefstring"), parseInt(el.value));
|
||||
|
||||
var el = document.getElementById('passwordTimeout');
|
||||
gPrefService.setIntPref(el.getAttribute("prefstring"), parseInt(el.value) );
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
|
||||
<!-- Change Password -->
|
||||
<groupbox>
|
||||
<caption label="&changepassword.label;"/>
|
||||
<description wdith="1">&changepassword.text;</description>
|
||||
<hbox align="center">
|
||||
<button label="&changepassword.button;"
|
||||
oncommand="ChangePW();"
|
||||
id="changePasswordButton"
|
||||
accesskey="&changepassword.accesskey;"
|
||||
prefstring="security.disable_button.changePassword"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
<!-- Password Prefs -->
|
||||
<groupbox>
|
||||
|
||||
<checkbox id="askEveryTimeHidden" value="false" checked="false" hidden="true"/>
|
||||
|
||||
<caption label="&managepassword.label;"/>
|
||||
<description width="1">&managepassword.text;</description>
|
||||
<hbox align="center">
|
||||
<radiogroup id="passwordAskTimes"
|
||||
prefstring="security.ask_for_password"
|
||||
flex="1">
|
||||
<!-- note that these values are different than what NSS uses, which
|
||||
are (0, -1, 1) respectively -->
|
||||
<radio value="0" label="&managepassword.askfirsttime;" id="askFirstTime"
|
||||
style="margin: 0px;" oncommand="changePasswordSettings(false);"/>
|
||||
<radio value="1" label="&managepassword.askeverytime;" id="askEveryTime"
|
||||
style="margin: 0px;" oncommand="changePasswordSettings(false);"/>
|
||||
<hbox align="center">
|
||||
<radio value="2" label="&managepassword.asktimeout;" id="askTimeout"
|
||||
style="margin: 0px;" oncommand="changePasswordSettings(true);"/>
|
||||
<textbox id="passwordTimeout" size="4"
|
||||
preftype="int"
|
||||
prefstring="security.password_lifetime"
|
||||
oninput="changePasswordSettings(false);"/>
|
||||
<label value="&managepassword.timeout.unit;" style="margin: 4px;"/>
|
||||
</hbox>
|
||||
</radiogroup>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
<!-- Reset Password -->
|
||||
<groupbox>
|
||||
<caption label="&resetpassword.label;"/>
|
||||
<description width="1">&resetpassword.text;</description>
|
||||
<hbox align="center">
|
||||
<button label="&resetpassword.button;"
|
||||
oncommand="ResetPW();"
|
||||
id="resetPasswordButton"
|
||||
accesskey="&resetpassword.accesskey;"
|
||||
prefstring="security.disable_button.resetPassword"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
</dialog>
|
||||
@ -7,6 +7,7 @@ messenger.jar:
|
||||
*+ content/messenger/pref-mailnews.js (content/pref-mailnews.js)
|
||||
*+ content/messenger/pref-advanced.xul (content/pref-advanced.xul)
|
||||
*+ content/messenger/pref-advanced.js (content/pref-advanced.js)
|
||||
content/messenger/pref-masterpass.xul (content/pref-masterpass.xul)
|
||||
|
||||
comm.jar:
|
||||
+ content/communicator/pref/pref.xul (content/pref.xul)
|
||||
@ -26,6 +27,7 @@ en-US.jar:
|
||||
+ locale/en-US/messenger/pref-viewing_messages.dtd (locale/pref-viewing_messages.dtd)
|
||||
+ locale/en-US/messenger/AccountManager.dtd (locale/AccountManager.dtd)
|
||||
+ locale/en-US/messenger/pref-advanced.dtd (locale/pref-advanced.dtd)
|
||||
+ locale/en-US/messenger/pref-masterpass.dtd (locale/pref-masterpass.dtd)
|
||||
+ locale/en-US/mozapps/downloads/pref-downloads.dtd (locale/pref-downloads.dtd)
|
||||
|
||||
en-win.jar:
|
||||
|
||||
@ -10,10 +10,13 @@
|
||||
<!ENTITY enbJsCheckMailNews.accesskey "J">
|
||||
|
||||
<!-- Password Manager -->
|
||||
<!ENTITY signonHeader.label "Passwords">
|
||||
<!ENTITY signonHeader.label "Saved Passwords">
|
||||
<!ENTITY signonDescription.label "Manage stored mail server passwords:">
|
||||
<!ENTITY viewSignons.label "Manage Stored Passwords">
|
||||
<!ENTITY viewSignons.label "View Saved Passwords...">
|
||||
<!ENTITY viewSignons.accesskey "e">
|
||||
<!ENTITY masterPasswordDesc.label "Manage master password settings:">
|
||||
<!ENTITY masterPassword.label "Master Password...">
|
||||
<!ENTITY masterPassword.accesskey "m">
|
||||
|
||||
<!-- General -->
|
||||
<!ENTITY generalSettings.label "General Settings">
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
<!ENTITY dialog.title "Master Password">
|
||||
|
||||
<!ENTITY managepassword.label "Master Password Timeout">
|
||||
<!ENTITY managepassword.text "&brandShortName; will ask for your master password:">
|
||||
<!ENTITY managepassword.askfirsttime "The first time it is needed">
|
||||
<!ENTITY managepassword.askeverytime "Every time it is needed">
|
||||
<!ENTITY managepassword.asktimeout "If it has not been used for ">
|
||||
<!ENTITY managepassword.timeout.unit "minutes or longer">
|
||||
|
||||
<!ENTITY changepassword.label "Change Master Password">
|
||||
<!ENTITY changepassword.text "Your master password protects sensitive information such as e-mail account passwords and certificates.">
|
||||
<!ENTITY changepassword.button "Change Password...">
|
||||
<!ENTITY changepassword.accesskey "C">
|
||||
|
||||
<!ENTITY resetpassword.label "Reset Master Password">
|
||||
<!ENTITY resetpassword.text "If you reset your master password, all of your stored e-mail passwords will be lost.">
|
||||
<!ENTITY resetpassword.button "Reset Password">
|
||||
<!ENTITY resetpassword.accesskey "R">
|
||||
@ -49,25 +49,34 @@
|
||||
|
||||
<script type="application/x-javascript" src="chrome://messenger/content/am-smime.js"/>
|
||||
|
||||
<!-- Password and Security Management -->
|
||||
<expander id="passwordManagement" label="&passwordAndSecurity.label;" open="true" persist="open" clearhidden="true">
|
||||
<hbox id="certificateManager" insertafter="passwordManager" align="center" pack="end">
|
||||
<label class="expanderDescription" value="&managecertsPref.label;" flex="1"/>
|
||||
<vbox id="expanderCategories">
|
||||
|
||||
<expander id="certs" insertafter="passwordManagement" label="&certs.label;" open="false" persist="open" clearhidden="true">
|
||||
<!-- Certificate manager -->
|
||||
<groupbox>
|
||||
<caption label="&managecerts.label;"/>
|
||||
<description>&managecerts.text;</description>
|
||||
<hbox align="center">
|
||||
<button label="&managecerts.button;"
|
||||
oncommand="openCertManager();"
|
||||
id="openCertManagerButton"
|
||||
accesskey="&managecerts.accesskey;"/>
|
||||
accesskey="&managecerts.accesskey;"
|
||||
prefstring="security.disable_button.openCertManager"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
<!-- TODO: honor pref locking for the security device manager -->
|
||||
<hbox id="securityDeviceManager" align="center" pack="end">
|
||||
<label class="expanderDescription" value="&managedevicesPref.label;" flex="1"/>
|
||||
<!-- Device manager -->
|
||||
<groupbox>
|
||||
<caption label="&managedevices.label;"/>
|
||||
<description>&managedevices.text;</description>
|
||||
<hbox align="center">
|
||||
<button label="&managedevices.button;"
|
||||
oncommand="openDeviceManager();"
|
||||
id="openDeviceManagerButton"
|
||||
accesskey="&managedevices.accesskey;"
|
||||
prefstring="security.disable_button.openDeviceManager"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
</expander>
|
||||
|
||||
</vbox>
|
||||
</overlay>
|
||||
|
||||
@ -22,4 +22,11 @@
|
||||
<!-- used by overloaded pref-smime-advanced overlay -->
|
||||
<!ENTITY managecertsPref.label "Manage your personal certificates:">
|
||||
<!ENTITY managedevicesPref.label "Manage your security devices such as smart cards:">
|
||||
<!ENTITY passwordAndSecurity.label "Passwords and Security">
|
||||
<!ENTITY passwordAndSecurity.label "Passwords and Security">
|
||||
|
||||
<!-- Certs -->
|
||||
<!ENTITY certs.label "Certificates">
|
||||
<!ENTITY managecerts.label "Manage Certificates">
|
||||
<!ENTITY managecerts.text "Use the Certificate Manager to manage your personal certificates, as well as those of other people and certificate authorities.">
|
||||
<!ENTITY managedevices.label "Manage Security Devices">
|
||||
<!ENTITY managedevices.text "Manage your security devices, such as smart cards.">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user