summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--js/account.js2
-rw-r--r--template/en/default/account/prefs/mfa.html.tmpl31
2 files changed, 20 insertions, 13 deletions
diff --git a/js/account.js b/js/account.js
index 76b385437..0525045b1 100644
--- a/js/account.js
+++ b/js/account.js
@@ -56,7 +56,6 @@ $(function() {
.click(function(event) {
event.preventDefault();
$('#mfa-enable-container').show();
- $('#mfa-api-blurb').show();
$(this).hide();
});
@@ -71,6 +70,7 @@ $(function() {
}
else {
$('#mfa-confirm').show();
+ $('.mfa-api-blurb').show();
if (mfa === 'TOTP') {
$('#mfa-enable-totp').show();
$('#mfa-totp-throbber').show();
diff --git a/template/en/default/account/prefs/mfa.html.tmpl b/template/en/default/account/prefs/mfa.html.tmpl
index 2a2cdf220..d6bec08a5 100644
--- a/template/en/default/account/prefs/mfa.html.tmpl
+++ b/template/en/default/account/prefs/mfa.html.tmpl
@@ -58,7 +58,20 @@
</div>
<p class="mfa-api-blurb">
- [% INCLUDE api_key_pref_blurb %]
+ [% IF user.settings.api_key_only.value == 'on' %]
+ Enabling two-factor authentication has also required systems that
+ interface with [% terms.Bugzilla %]'s API to use <a href="userprefs.cgi?tab=apikey">API keys</a>
+ for authentication.<br>
+ <br>
+ While not recommended, this limitation can be lifted by changing the
+ <a href="userprefs.cgi?tab=settings#api_key_only">Require API key authentication for API requests</a>
+ preference.
+ [% ELSE %]
+ Systems that interface with [% terms.Bugzilla %]'s API are not required to use API keys.<br>
+ Change the
+ <a href="userprefs.cgi?tab=settings#api_key_only">Require API key authentication for API requests</a>
+ preference to enforce API key usage.
+ [% END %]
</p>
[% ELSE %]
@@ -142,18 +155,12 @@
</p>
<p class="mfa-api-blurb" style="display:none">
- [% INCLUDE api_key_pref_blurb %]
+ Enabling two-factor authentication will also require systems that
+ interface with [% terms.Bugzilla %]'s API to use <a href="userprefs.cgi?tab=apikey">API keys</a>
+ for authentication. While not recommended, this limitation can be lifted by changing the
+ <a href="userprefs.cgi?tab=settings#api_key_only">Require API key authentication for API requests</a>
+ preference after 2FA is enabled.
</p>
</div>
</div>
-
-[% BLOCK api_key_pref_blurb %]
- Enabling two-factor authentication will also require systems that
- interface with [% terms.Bugzilla %]'s API to use <a href="userprefs.cgi?tab=apikey">API keys</a>
- for authentication.<br>
- <br>
- While not recommended, this limitation can be lifted by changing the
- <a href="userprefs.cgi?tab=settings#api_key_only">Require API key authentication for API requests</a>
- preference after 2FA is enabled.
-[% END %]