summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2015-01-29 18:33:12 +0100
committerDavid Lawrence <dkl@mozilla.com>2015-01-29 18:33:12 +0100
commitc8447e9f4b7c17ab0e04af34dbd5583e78b23677 (patch)
tree573093df276637e98796717c325c3fc5c040263d /js
parent89d319922df1160f346321acfa6a9c5d69b5ed43 (diff)
downloadbugzilla-c8447e9f4b7c17ab0e04af34dbd5583e78b23677.tar.gz
bugzilla-c8447e9f4b7c17ab0e04af34dbd5583e78b23677.tar.xz
Bug 1045145: backport upstream bug 726696 to bmo/4.2 to allow use of api keys for authentication
Diffstat (limited to 'js')
-rw-r--r--js/bug.js10
-rw-r--r--js/comment-tagging.js8
-rw-r--r--js/field.js2
3 files changed, 17 insertions, 3 deletions
diff --git a/js/bug.js b/js/bug.js
index 97a330af1..1089bce99 100644
--- a/js/bug.js
+++ b/js/bug.js
@@ -33,6 +33,7 @@ YAHOO.bugzilla.dupTable = {
method : "Bug.possible_duplicates",
id : YAHOO.bugzilla.dupTable.counter,
params : {
+ Bugzilla_api_token: BUGZILLA.api_token,
product : product_name,
summary : summary_field.value,
limit : 7,
@@ -139,7 +140,10 @@ YAHOO.bugzilla.dupTable = {
var args = JSON.stringify({
version: "1.1",
method: 'BugUserLastVisit.update',
- params: { ids: bug_ids },
+ params: {
+ Bugzilla_api_token: BUGZILLA.api_token,
+ ids: bug_ids
+ }
});
var callbacks = {
failure: function(res) {
@@ -158,7 +162,9 @@ YAHOO.bugzilla.dupTable = {
var args = JSON.stringify({
version: "1.1",
method: 'BugUserLastVisit.get',
- params: { },
+ params: {
+ Bugzilla_api_token: BUGZILLA.api_token
+ }
});
var callbacks = {
success: function(res) { done(JSON.parse(res.responseText)) },
diff --git a/js/comment-tagging.js b/js/comment-tagging.js
index c110eb00e..3b254cfa8 100644
--- a/js/comment-tagging.js
+++ b/js/comment-tagging.js
@@ -54,7 +54,11 @@ YAHOO.bugzilla.commentTagging = {
return YAHOO.lang.JSON.stringify({
method : "Bug.search_comment_tags",
id : YAHOO.bugzilla.commentTagging.counter,
- params : [ { query : query, limit : 10 } ]
+ params : {
+ Bugzilla_api_token: BUGZILLA.api_token,
+ query : query,
+ limit : 10
+ }
});
};
ac.minQueryLength = this.min_len;
@@ -340,6 +344,7 @@ YAHOO.bugzilla.commentTagging = {
version: "1.1",
method: 'Bug.comments',
params: {
+ Bugzilla_api_token: BUGZILLA.api_token,
comment_ids: [ comment_id ],
include_fields: [ 'tags' ]
}
@@ -372,6 +377,7 @@ YAHOO.bugzilla.commentTagging = {
version: "1.1",
method: 'Bug.update_comment_tags',
params: {
+ Bugzilla_api_token: BUGZILLA.api_token,
comment_id: comment_id,
add: add,
remove: remove
diff --git a/js/field.js b/js/field.js
index 286390ed1..b35cfe782 100644
--- a/js/field.js
+++ b/js/field.js
@@ -709,6 +709,7 @@ YAHOO.bugzilla.userAutocomplete = {
method : "User.get",
id : YAHOO.bugzilla.userAutocomplete.counter,
params : [ {
+ Bugzilla_api_token: BUGZILLA.api_token,
match : [ decodeURIComponent(enteredText) ],
include_fields : [ "name", "real_name" ]
} ]
@@ -917,6 +918,7 @@ function show_comment_preview(bug_id) {
version: "1.1",
method: 'Bug.render_comment',
params: {
+ Bugzilla_api_token: BUGZILLA.api_token,
id: bug_id,
text: comment.value
}