From 7c39ca2f98f2f5431713ad387849217f12cc03c2 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Tue, 1 Sep 2015 15:18:48 +0000 Subject: Bug 1200610: jsonrpc API requests do not work when "Require API-Key authentication for API requests" is enabled due to missing API tokens --- extensions/MyDashboard/web/js/flags.js | 4 +++- extensions/MyDashboard/web/js/query.js | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'extensions/MyDashboard') diff --git a/extensions/MyDashboard/web/js/flags.js b/extensions/MyDashboard/web/js/flags.js index 0fcf75618..e8c175155 100644 --- a/extensions/MyDashboard/web/js/flags.js +++ b/extensions/MyDashboard/web/js/flags.js @@ -50,7 +50,9 @@ YUI({ version: "1.1", method: "MyDashboard.run_flag_query", id: counter, - params: { type : type } + params: { type : type, + Bugzilla_api_token : (BUGZILLA.api_token ? BUGZILLA.api_token : '') + } }; var stringified = Y.JSON.stringify(json_object); diff --git a/extensions/MyDashboard/web/js/query.js b/extensions/MyDashboard/web/js/query.js index 42dfca561..9cea27f87 100644 --- a/extensions/MyDashboard/web/js/query.js +++ b/extensions/MyDashboard/web/js/query.js @@ -122,7 +122,9 @@ YUI({ version: "1.1", method: "MyDashboard.run_bug_query", id: counter, - params: { query : query_name } + params: { query : query_name, + Bugzilla_api_token : (BUGZILLA.api_token ? BUGZILLA.api_token : '') + } }; bugQuery.sendRequest({ @@ -206,7 +208,11 @@ YUI({ var lastChangesParams = { version: "1.1", method: "MyDashboard.run_last_changes", - params: { bug_id: data.bug_id, changeddate_api: data.changeddate_api } + params: { + bug_id: data.bug_id, + changeddate_api: data.changeddate_api, + Bugzilla_api_token : (BUGZILLA.api_token ? BUGZILLA.api_token : '') + } }; lastChangesQuery.sendRequest({ -- cgit v1.2.3-24-g4f1b