зеркало из https://github.com/mozilla/gecko-dev.git
Make "Log Out" clear all HTTP auth sessions as well as expiring the master password b=55181 p=vhaarr@firefox.no r=me sr=darin
This commit is contained in:
Родитель
bca91b2417
Коммит
a01e4f8ff5
|
@ -45,11 +45,17 @@
|
||||||
<script type="application/x-javascript">
|
<script type="application/x-javascript">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
|
||||||
// expire master password
|
// First clears the HTTP auth, then the Wallet
|
||||||
function walletPasswordExpire() {
|
function expireHTTPAuthAndWallet() {
|
||||||
var wallet = Components.classes['@mozilla.org/wallet/wallet-service;1'];
|
// Queries the HTTP Auth Manager and clears all sessions
|
||||||
wallet = wallet.getService();
|
Components.classes['@mozilla.org/network/http-auth-manager;1']
|
||||||
wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService);
|
.getService(Components.interfaces.nsIHttpAuthManager)
|
||||||
|
.clearAll();
|
||||||
|
|
||||||
|
// Expires the master password
|
||||||
|
var wallet =
|
||||||
|
Components.classes['@mozilla.org/wallet/wallet-service;1']
|
||||||
|
.getService(Components.interfaces.nsIWalletService);
|
||||||
var strings = document.getElementById("menu_passwordManager");
|
var strings = document.getElementById("menu_passwordManager");
|
||||||
|
|
||||||
if (wallet.WALLET_ExpirePassword()) {
|
if (wallet.WALLET_ExpirePassword()) {
|
||||||
|
@ -79,7 +85,7 @@
|
||||||
<menupopup>
|
<menupopup>
|
||||||
<menuitem label="&walletExpirePasswordCmd.label;"
|
<menuitem label="&walletExpirePasswordCmd.label;"
|
||||||
accesskey="&walletExpirePasswordCmd.accesskey;"
|
accesskey="&walletExpirePasswordCmd.accesskey;"
|
||||||
oncommand="walletPasswordExpire();"/>
|
oncommand="expireHTTPAuthAndWallet();"/>
|
||||||
<menuitem label="&walletDisplaySignonsCmd.label;"
|
<menuitem label="&walletDisplaySignonsCmd.label;"
|
||||||
accesskey="&walletDisplaySignonsCmd.accesskey;"
|
accesskey="&walletDisplaySignonsCmd.accesskey;"
|
||||||
oncommand="walletPasswordDialog();"/>
|
oncommand="walletPasswordDialog();"/>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче