Skip to content

Commit 32cf435

Browse files
committed
Bug 1202975 - warning about api key requirement is no longer shown when enabling 2fa
1 parent e358696 commit 32cf435

2 files changed

Lines changed: 20 additions & 13 deletions

File tree

js/account.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ $(function() {
5656
.click(function(event) {
5757
event.preventDefault();
5858
$('#mfa-enable-container').show();
59-
$('#mfa-api-blurb').show();
6059
$(this).hide();
6160
});
6261

@@ -71,6 +70,7 @@ $(function() {
7170
}
7271
else {
7372
$('#mfa-confirm').show();
73+
$('.mfa-api-blurb').show();
7474
if (mfa === 'TOTP') {
7575
$('#mfa-enable-totp').show();
7676
$('#mfa-totp-throbber').show();

template/en/default/account/prefs/mfa.html.tmpl

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,20 @@
5858
</div>
5959

6060
<p class="mfa-api-blurb">
61-
[% INCLUDE api_key_pref_blurb %]
61+
[% IF user.settings.api_key_only.value == 'on' %]
62+
Enabling two-factor authentication has also required systems that
63+
interface with [% terms.Bugzilla %]'s API to use <a href="userprefs.cgi?tab=apikey">API keys</a>
64+
for authentication.<br>
65+
<br>
66+
While not recommended, this limitation can be lifted by changing the
67+
<a href="userprefs.cgi?tab=settings#api_key_only">Require API key authentication for API requests</a>
68+
preference.
69+
[% ELSE %]
70+
Systems that interface with [% terms.Bugzilla %]'s API are not required to use API keys.<br>
71+
Change the
72+
<a href="userprefs.cgi?tab=settings#api_key_only">Require API key authentication for API requests</a>
73+
preference to enforce API key usage.
74+
[% END %]
6275
</p>
6376

6477
[% ELSE %]
@@ -142,18 +155,12 @@
142155
</p>
143156

144157
<p class="mfa-api-blurb" style="display:none">
145-
[% INCLUDE api_key_pref_blurb %]
158+
Enabling two-factor authentication will also require systems that
159+
interface with [% terms.Bugzilla %]'s API to use <a href="userprefs.cgi?tab=apikey">API keys</a>
160+
for authentication. While not recommended, this limitation can be lifted by changing the
161+
<a href="userprefs.cgi?tab=settings#api_key_only">Require API key authentication for API requests</a>
162+
preference after 2FA is enabled.
146163
</p>
147164
</div>
148165

149166
</div>
150-
151-
[% BLOCK api_key_pref_blurb %]
152-
Enabling two-factor authentication will also require systems that
153-
interface with [% terms.Bugzilla %]'s API to use <a href="userprefs.cgi?tab=apikey">API keys</a>
154-
for authentication.<br>
155-
<br>
156-
While not recommended, this limitation can be lifted by changing the
157-
<a href="userprefs.cgi?tab=settings#api_key_only">Require API key authentication for API requests</a>
158-
preference after 2FA is enabled.
159-
[% END %]

0 commit comments

Comments
 (0)