summaryrefslogtreecommitdiffstats
path: root/app/views/my
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-08-29 06:21:50 +0000
committerGo MAEDA <maeda@farend.jp>2020-08-29 06:21:50 +0000
commit560bca344ae467cda03e758159fbf131d5c49f43 (patch)
tree15b4b2ec74c1d98e28f47453093588b271e18865 /app/views/my
parent657ddfef452b145bbbce2970369ce42624dfca8e (diff)
downloadredmine-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/my')
-rw-r--r--app/views/my/_sidebar.html.erb2
-rw-r--r--app/views/my/account.html.erb11
2 files changed, 12 insertions, 1 deletions
diff --git a/app/views/my/_sidebar.html.erb b/app/views/my/_sidebar.html.erb
index e372425aa..e962538b5 100644
--- a/app/views/my/_sidebar.html.erb
+++ b/app/views/my/_sidebar.html.erb
@@ -4,7 +4,7 @@
<%=l(:field_created_on)%>: <%= format_time(@user.created_on) %></p>
<% if @user.own_account_deletable? %>
- <p><%= link_to(l(:button_delete_my_account), {:action => 'destroy'}, :class => 'icon icon-del') %></p>
+ <p><%= link_to(l(:button_delete_my_account), {:controller => 'my', :action => 'destroy'}, :class => 'icon icon-del') %></p>
<% end %>
<h4><%= l(:label_feeds_access_key) %></h4>
diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb
index 87b2d7cbd..da7746bb2 100644
--- a/app/views/my/account.html.erb
+++ b/app/views/my/account.html.erb
@@ -28,6 +28,17 @@
<% if Setting.openid? %>
<p><%= f.text_field :identity_url %></p>
<% end %>
+ <p>
+ <label><%=l :setting_twofa -%></label>
+ <% if @user.twofa_active? %>
+ <%=l 'twofa_currently_active', twofa_scheme_name: l("twofa__#{@user.twofa_scheme}__name") -%><br/>
+ <%= link_to l('button_disable'), { controller: 'twofa', action: 'deactivate_init', scheme: @user.twofa_scheme }, method: :post -%><br/>
+ <% else %>
+ <% Redmine::Twofa.available_schemes.each do |s| %>
+ <%= link_to l("twofa__#{s}__label_activate"), { controller: 'twofa', action: 'activate_init', scheme: s }, method: :post -%><br/>
+ <% end %>
+ <% end %>
+ </p>
<% @user.custom_field_values.select(&:editable?).each do |value| %>
<p><%= custom_field_tag_with_label :user, value %></p>