Feature #34495

Don't show "Two-factor authentication" on new user form

Added by Go MAEDA 12 months ago. Updated 11 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Accounts / authentication
Target version:-
Resolution:Fixed

Description

"Two-factor authentication" on a new user form is always showing "Not activated". Of course, this is because a user about to be created can never activate it.

I think it should be removed from the new user form. The item "Two-factor authentication" is necessary when editing an existing user, but is not useful when creating a new user because it always, only shows "Two-factor authentication: Not activated".

The indication not only useless but sometimes confuses admins. In my observation, some people misunderstood that two-factor authentication cannot be used on the Redmine instance.

diff --git a/app/views/users/_form.html.erb b/app/views/users/_form.html.erb
index ab9f7b541..4b030d920 100644
--- a/app/views/users/_form.html.erb
+++ b/app/views/users/_form.html.erb
@@ -42,7 +42,7 @@
   <p><%= f.check_box :generate_password %></p>
   <p><%= f.check_box :must_change_passwd %></p>
   </div>
-  <% if Setting.twofa? -%>
+  <% if Setting.twofa? && !@user.new_record? -%>
   <p>
     <label><%=l :setting_twofa -%></label>
     <% if @user.twofa_active? %>

twofa-on-new-user-form.png (62.4 KB) Go MAEDA, 2020-12-23 09:51


Related issues

Related to Redmine - Feature #1237: Add support for two-factor authentication Closed 2008-05-14

Associated revisions

Revision 20691
Added by Go MAEDA 11 months ago

Don't show "Two-factor authentication" on new user form (#1237, #34495).

History

#1 Updated by Go MAEDA 12 months ago

  • Related to Feature #1237: Add support for two-factor authentication added

#2 Updated by Go MAEDA 11 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch as a part of #1237.

Also available in: Atom PDF