aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-07-16 00:28:35 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-07-16 00:28:35 +0200
commita4cd1413badcf85553f2f3f62aba364289746c0e (patch)
tree2897019e359b5dc80bc5ae72ceea322155c516a6 /lib
parent123513286f8baadb97c27468690b5bdf335dcecc (diff)
downloadbugzilla-triage-a4cd1413badcf85553f2f3f62aba364289746c0e.tar.gz
change {set,remove}Password to *Login
Diffstat (limited to 'lib')
-rw-r--r--lib/passwords.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/passwords.js b/lib/passwords.js
index a5adee0..f194e79 100644
--- a/lib/passwords.js
+++ b/lib/passwords.js
@@ -18,7 +18,7 @@ function getPasswordManager() {
getService(Ci.nsILoginManager);
}
-exports.setPassword = function setPassword (username, pass,
+exports.setLogin = function setLogin (username, pass,
domain, realm) {
var lInfo = getLoginInfo(username, pass, domain, realm);
getPasswordManager().addLogin(lInfo);
@@ -26,7 +26,7 @@ exports.setPassword = function setPassword (username, pass,
var getPassword = exports.getPassword = function getPassword(username,
domain, realm) {
-
+
var pwMgr = getPasswordManager();
var logins = pwMgr.findLogins({}, domain, "", realm);
var ourLogins = Array.filter(logins, function (x) {
@@ -38,14 +38,13 @@ var getPassword = exports.getPassword = function getPassword(username,
} else {
return null;
}
-};
-exports.removePassword = function removePassword(username,
+exports.removeLogin = function removeLogin(username,
domain, realm) {
var pass = getPassword(username, domain, realm);
var pwMgr = getPasswordManager();
var logins = pwMgr.findLogins({}, domain, "", realm);
-
+
// Don't do Array.forEach here ... emulating break there
// is an abomination
for (var i = 0, ii = logins.length; i < ii; i++) {