Actions
Feature #34495
closedDon't show "Two-factor authentication" on new user form
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
Related issues
Updated by Go MAEDA about 4 years ago
- Related to Feature #1237: Add support for two-factor authentication added
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