OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/views/settings/_authentication.html.erb

92 lines
3.9 KiB

<%#-- copyright
OpenProject is a project management system.
Copyright (C) 2012-2013 the OpenProject Foundation (OPF)
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-2013 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 doc/COPYRIGHT.rdoc for more details.
++#%>
<%= form_tag({:action => 'edit', :tab => 'authentication'}) do %>
<div class="box tabular settings">
<fieldset>
<legend><%= I18n.t(:general, :scope => [:settings]) %></legend>
<p><%= setting_check_box :login_required %></p>
<p><%= setting_select :self_registration, [[l(:label_disabled), "0"],
[l(:label_registration_activation_by_email), "1"],
[l(:label_registration_manual_activation), "2"],
[l(:label_registration_automatic_activation), "3"]] %></p>
</fieldset>
<fieldset>
<legend><%= I18n.t(:passwords, :scope => [:settings]) %></legend>
<p><%= setting_text_field :password_min_length, :size => 6 %></p>
<p><%= setting_multiselect :password_active_rules,
OpenProject::Passwords::Evaluator.known_rules.map do |r|
[l("label_password_rule_#{r}"), r]
end %></p>
<p><%= setting_text_field :password_min_adhered_rules, :size => 6 %></p>
<p><%= setting_text_field :password_days_valid, :size => 6 %></p>
<p><%= setting_text_field :password_count_former_banned, :size => 6 %></p>
<p><%= setting_check_box :lost_password, :label => :label_password_lost %></p>
</fieldset>
<fieldset>
<legend><%= I18n.t(:brute_force_prevention, :scope => [:settings]) %></legend>
<p><%= setting_text_field :brute_force_block_after_failed_logins %></p>
<p><%= setting_text_field :brute_force_block_minutes %></p>
</fieldset>
<fieldset>
<legend><%= I18n.t(:session, :scope => [:settings]) %></legend>
<p><%= setting_select :autologin,
([[l(:label_disabled), 0]] +
[1, 7, 30, 365].collect do |days|
[l('datetime.distance_in_words.x_days', :count => days),
days.to_s]
end) %>
</p>
<p><%= setting_check_box :session_ttl_enabled %></p>
<p id="settings_session_ttl_container" style="display:none;">
<%= setting_text_field :session_ttl, :size => 6 %> min<br />
<em><%= I18n.t('setting_session_ttl_hint') %></em>
</p>
</fieldset>
<fieldset>
<legend><%= I18n.t(:other, :scope => [:settings]) %></legend>
<p><%= setting_check_box :openid, :disabled => !Object.const_defined?(:OpenID) %></p>
<p><%= setting_check_box :log_requesting_user %></p>
<p><%= setting_check_box :rest_api_enabled %></p>
</fieldset>
</div>
<div style="float:right;">
<%= link_to l(:label_ldap_authentication), {:controller => '/ldap_auth_sources', :action => 'index'}, :class => 'icon icon-server-authentication' %>
</div>
<%= submit_tag l(:button_save) %>
<% end %>