diff options
author | David Lawrence <dkl@mozilla.com> | 2015-01-29 18:33:12 +0100 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2015-01-29 18:33:12 +0100 |
commit | c8447e9f4b7c17ab0e04af34dbd5583e78b23677 (patch) | |
tree | 573093df276637e98796717c325c3fc5c040263d /template/en/default/global | |
parent | 89d319922df1160f346321acfa6a9c5d69b5ed43 (diff) | |
download | bugzilla-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 'template/en/default/global')
-rw-r--r-- | template/en/default/global/header.html.tmpl | 3 | ||||
-rw-r--r-- | template/en/default/global/user-error.html.tmpl | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/template/en/default/global/header.html.tmpl b/template/en/default/global/header.html.tmpl index 4ea41ebbd..3151a96dd 100644 --- a/template/en/default/global/header.html.tmpl +++ b/template/en/default/global/header.html.tmpl @@ -226,6 +226,9 @@ version_required: 'You must select a Version for this [% terms.bug %].' } + [% IF javascript_urls.containsany(['js/bug.js', 'js/field.js', 'js/comment-tagging.js']) %] + , api_token: '[% get_api_token FILTER js FILTER html %]' + [% END %] }; [% IF NOT no_yui %] diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index 3146d4a90..c36ae2c4c 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -109,6 +109,15 @@ [% terms.Bug %] aliases cannot be longer than 20 characters. Please choose a shorter alias. + [% ELSIF error == "api_key_not_valid" %] + [% title = "Invalid API key" %] + The API key you specified is invalid. Please check that you typed it + correctly. + + [% ELSIF error == "api_key_revoked" %] + [% title = "Invalid API key" %] + The API key you specified has been revoked by the user that created it. + [% ELSIF error == "attachment_bug_id_mismatch" %] [% title = "Invalid Attachments" %] You tried to perform an action on attachments from different [% terms.bugs %]. @@ -235,6 +244,11 @@ [% Hook.process("auth_failure") %] + [% ELSIF error == "auth_invalid_token" %] + [% title = 'A token error occurred' %] + The token is not valid. It could be because you loaded this page more than + [% constants.MAX_TOKEN_AGE FILTER html %] days ago. + [% ELSIF error == "attachment_deletion_disabled" %] [% title = "Attachment Deletion Disabled" %] Attachment deletion is disabled on this installation. |