aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libbugzilla.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libbugzilla.js')
-rw-r--r--lib/libbugzilla.js30
1 files changed, 16 insertions, 14 deletions
diff --git a/lib/libbugzilla.js b/lib/libbugzilla.js
index 2dc1dc5..145332a 100644
--- a/lib/libbugzilla.js
+++ b/lib/libbugzilla.js
@@ -124,7 +124,6 @@ function getPassword(login, domain, callback) {
else {
// We don't have password, and user haven't entered one?
// Does he want to live passwordless?
- // FIXME should we call the callback at all?
var switchOff = prompts.promptYesNoCancel(switchPrompt);
if (switchOff) {
preferences.set(prefName,true);
@@ -137,6 +136,7 @@ function getPassword(login, domain, callback) {
});
}
+// Change URL of the configuration JSON file
exports.changeJSONURL = function changeJSONURL() {
var prfNm = BTSPrefNS+"JSONURL";
var url = preferences.get(prfNm, JSONURLDefault);
@@ -329,24 +329,26 @@ exports.makeXMLRPCCall = function makeXMLRPCCall(url, login, method, params, cal
);
};
-exports.makeJSONRPCCallWithLogin = function makeJSONRPCCallWithLogin(url, method, params,
- login, callback) {
+exports.makeJSONRPCCallWithLogin = function makeJSONRPCCallWithLogin(url, method,
+ params, login, callback) {
var urlObj = urlMod.URL(url);
getPassword(login,
urlObj.scheme + "://" + urlObj.host,
function (passObj) {
- if (!passObj.password) {
- return;
- }
+ if (!passObj.password) {
+ return;
+ }
- makeJSONRPCCall(url, "User.login", {
- login: login,
- password: passObj.password,
- remember: false
- }, function(logResult) {
- makeJSONRPCCall(url, method, params, callback);
- });
- }
+ console.myDebug("makeJSONRPCCallWithLogin: passObj = " +
+ passObj.toSource());
+ makeJSONRPCCall(url, "User.login", {
+ login: login,
+ password: passObj.password,
+ remember: false
+ }, function(logResult) {
+ makeJSONRPCCall(url, method, params, callback);
+ });
+ }
);
};