diff options
author | Go MAEDA <maeda@farend.jp> | 2020-08-29 06:21:50 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2020-08-29 06:21:50 +0000 |
commit | 560bca344ae467cda03e758159fbf131d5c49f43 (patch) | |
tree | 15b4b2ec74c1d98e28f47453093588b271e18865 /app/views/users | |
parent | 657ddfef452b145bbbce2970369ce42624dfca8e (diff) | |
download | redmine-560bca344ae467cda03e758159fbf131d5c49f43.tar.gz redmine-560bca344ae467cda03e758159fbf131d5c49f43.zip |
Adds two factor authentication support (#1237).
Patch by Felix Schäfer.
git-svn-id: http://svn.redmine.org/redmine/trunk@19988 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/users')
-rw-r--r-- | app/views/users/_form.html.erb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/views/users/_form.html.erb b/app/views/users/_form.html.erb index bb20a4f9d..b9054a3b0 100644 --- a/app/views/users/_form.html.erb +++ b/app/views/users/_form.html.erb @@ -42,6 +42,19 @@ <p><%= f.check_box :generate_password %></p> <p><%= f.check_box :must_change_passwd %></p> </div> + <p> + <label><%=l :setting_twofa -%></label> + <% if @user.twofa_active? %> + <%=l 'twofa_currently_active', twofa_scheme_name: l("twofa__#{@user.twofa_scheme}__name") -%><br/> + <% if @user == User.current # administrators cannot deactivate their own 2FA without confirmation code %> + <%= link_to l('button_disable'), { controller: 'twofa', action: 'deactivate_init', scheme: @user.twofa_scheme }, method: :post -%> + <% else %> + <%= link_to l('button_disable'), { controller: 'twofa', action: 'admin_deactivate', user_id: @user }, method: :post -%> + <% end %> + <% else %> + <%=l 'twofa_not_active' %> + <% end %> + </p> </fieldset> </div> |