summaryrefslogtreecommitdiffstats
path: root/app/views/twofa
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-08-29 06:37:09 +0000
committerGo MAEDA <maeda@farend.jp>2020-08-29 06:37:09 +0000
commitbe7f5e21faa05bdc483d1b58c8887ff499082073 (patch)
tree3eb76db7dfd87ad1b41494261d54b48f0d3ac09f /app/views/twofa
parent560bca344ae467cda03e758159fbf131d5c49f43 (diff)
downloadredmine-be7f5e21faa05bdc483d1b58c8887ff499082073.tar.gz
redmine-be7f5e21faa05bdc483d1b58c8887ff499082073.zip
Adds a setting to disable/enable/require 2fa auth (#1237).
Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@19989 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/twofa')
-rw-r--r--app/views/twofa/activate_confirm.html.erb2
-rw-r--r--app/views/twofa/select_scheme.html.erb19
2 files changed, 21 insertions, 0 deletions
diff --git a/app/views/twofa/activate_confirm.html.erb b/app/views/twofa/activate_confirm.html.erb
index fc356323c..78194c62b 100644
--- a/app/views/twofa/activate_confirm.html.erb
+++ b/app/views/twofa/activate_confirm.html.erb
@@ -22,6 +22,8 @@
<% end %>
</div>
+<% unless @user.must_activate_twofa? %>
<% content_for :sidebar do %>
<%= render :partial => 'my/sidebar' %>
<% end %>
+<% end %>
diff --git a/app/views/twofa/select_scheme.html.erb b/app/views/twofa/select_scheme.html.erb
new file mode 100644
index 000000000..cbc7c3506
--- /dev/null
+++ b/app/views/twofa/select_scheme.html.erb
@@ -0,0 +1,19 @@
+<%= title l('twofa_label_setup') %>
+
+<%= form_tag({ controller: 'twofa', action: 'activate_init' }, method: :post) do %>
+ <div class="box">
+ <p><%=l 'twofa_notice_select' -%></p>
+ <p>
+ <% Redmine::Twofa.available_schemes.each_with_index do |s, idx| %>
+ <label style="display:block;"><%= radio_button_tag 'scheme', s, idx == 0 -%> <%=l "twofa__#{s}__name" -%></label>
+ <% end %>
+ </p>
+ </div>
+ <p><%= submit_tag l(:label_next).html_safe + " &#187;".html_safe -%></p>
+<% end %>
+
+<% unless @user.must_activate_twofa? %>
+<% content_for :sidebar do %>
+<%= render partial: 'my/sidebar' %>
+<% end %>
+<% end %>