<%#-- copyright OpenProject is an open source project management software. Copyright (C) 2012-2020 the OpenProject GmbH This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3. OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: Copyright (C) 2006-2017 Jean-Philippe Lang Copyright (C) 2010-2013 the ChiliProject Team This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See docs/COPYRIGHT.rdoc for more details. ++#%> <% html_title l(:label_administration), l(:label_authentication) -%> <%= toolbar title: l(:label_authentication) %> <%= styled_form_tag({ action: :edit }) do %>
<%= I18n.t(:general, scope: [:settings]) %>
<%= setting_check_box :login_required %>
<%= setting_select :self_registration, [[t(:label_disabled), Setting::SelfRegistration.disabled.to_s], [t(:label_registration_activation_by_email), Setting::SelfRegistration.by_email.to_s], [t(:label_registration_manual_activation), Setting::SelfRegistration.manual.to_s], [t(:label_registration_automatic_activation), Setting::SelfRegistration.automatic.to_s]], container_class: '-middle' %>
<%= setting_check_box :email_login, title: I18n.t("tooltip.setting_email_login") %>
<% if OpenProject::Configuration.registration_footer.blank? %> <%= cell Settings::NumericSettingCell, "invitation_expiration_days", unit: "days" %>
<% end %>
<%= I18n.t(:passwords, scope: [:settings]) %> <% if !OpenProject::Configuration.disable_password_login? %>
<%= setting_text_field :password_min_length, size: 6, container_class: '-xslim' %>
<%= setting_multiselect :password_active_rules, OpenProject::Passwords::Evaluator.known_rules.map do |r| [t("label_password_rule_#{r}"), r] end %>
<%= setting_text_field :password_min_adhered_rules, size: 6, container_class: '-xslim' %>
<%= setting_text_field :password_days_valid, size: 6, container_class: '-xslim' %> <%= t(:text_hint_disable_with_0) %>
<%= setting_text_field :password_count_former_banned, size: 6, container_class: '-xslim' %>
<%= setting_check_box :lost_password, label: :label_password_lost %>
<% else %>
<% end %>
<% unless OpenProject::Configuration.disable_password_login? %>
<%= I18n.t(:brute_force_prevention, scope: [:settings]) %>
<%= setting_text_field :brute_force_block_after_failed_logins, container_class: '-xslim' %> <%= t(:text_hint_disable_with_0) %>
<%= setting_text_field :brute_force_block_minutes, unit: t(:label_minute_plural), container_class: '-xslim' %>
<% end %>
<%= I18n.t(:session, scope: [:settings]) %>
<%= setting_select :autologin, ([[t(:label_disabled), 0]] + [1, 7, 30, 365].collect do |days| [t('datetime.distance_in_words.x_days', count: days), days.to_s] end), container_class: '-xslim' %>
<%= setting_check_box :session_ttl_enabled %>
<%= I18n.t(:other, scope: [:settings]) %>
<%= setting_check_box :log_requesting_user %>
<%= setting_check_box :rest_api_enabled %>
<% unless OpenProject::Configuration.disable_password_login? %>
<%= link_to t(:label_ldap_authentication), {controller: '/ldap_auth_sources', action: 'index'}, class: 'icon icon-server-key' %>
<% end %> <%= styled_button_tag t(:button_save), class: '-highlight -with-icon icon-checkmark' %> <% end %>