Project

General

Profile

Actions

Feature #34495

closed

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

Added by Go MAEDA about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Accounts / authentication
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
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? %>


Files

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

Related issues

Related to Redmine - Feature #1237: Add support for two-factor authenticationClosedGo MAEDA2008-05-14

Actions
Actions #1

Updated by Go MAEDA about 4 years ago

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

Updated by Go MAEDA about 4 years ago

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

Committed the patch as a part of #1237.

Actions

Also available in: Atom PDF