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/Review/web/js/review_history.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'extensions/Review') diff --git a/extensions/Review/web/js/review_history.js b/extensions/Review/web/js/review_history.js index 4e31d2f73..8d016b009 100644 --- a/extensions/Review/web/js/review_history.js +++ b/extensions/Review/web/js/review_history.js @@ -127,7 +127,8 @@ params: { type_name: 'review', requestee: user, - include_fields: ['flag_id', 'status'] + include_fields: ['flag_id', 'status'], + Bugzilla_api_token : (BUGZILLA.api_token ? BUGZILLA.api_token : '') } }), cfg: { @@ -145,7 +146,10 @@ request: Y.JSON.stringify({ version: '1.1', method: 'Review.flag_activity', - params: { flag_ids: flag_ids } + params: { + flag_ids: flag_ids, + Bugzilla_api_token: (BUGZILLA.api_token ? BUGZILLA.api_token : '') + } }), cfg: { method: 'POST', @@ -181,7 +185,11 @@ request: Y.JSON.stringify({ version: '1.1', method: 'Bug.get', - params: { ids: bug_ids, include_fields: ['summary', 'id'] } + params: { + ids: bug_ids, + include_fields: ['summary', 'id'], + Bugzilla_api_token: (BUGZILLA.api_token ? BUGZILLA.api_token : '') + } }), cfg: { method: 'POST', @@ -220,7 +228,8 @@ method: 'Bug.attachments', params: { attachment_ids: attachment_ids, - include_fields: ['id', 'description'] + include_fields: ['id', 'description'], + Bugzilla_api_token : (BUGZILLA.api_token ? BUGZILLA.api_token : '') } }), cfg: { -- cgit v1.2.3-24-g4f1b