Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Move rule map in extra variable to make sure it is evaluated before passed as param

Henriette Dingerc61f70bd5b5f
diff --git a/app/views/authentication/authentication_settings.html.erb b/app/views/authentication/authentication_settings.html.erb
index d448d022f92..19351696b03 100644
--- a/app/views/authentication/authentication_settings.html.erb
+++ b/app/views/authentication/authentication_settings.html.erb
@@ -63,10 +63,12 @@ See docs/COPYRIGHT.rdoc for more details.
<legend class="form--fieldset-legend"><%= I18n.t(:passwords, scope: [:settings]) %></legend>
<% if !OpenProject::Configuration.disable_password_login? %>
<div class="form--field -wide-label"><%= setting_text_field :password_min_length, size: 6, container_class: '-xslim' %></div>
- <div class="form--field -wide-label"><%= setting_multiselect :password_active_rules,
- OpenProject::Passwords::Evaluator.known_rules.map do |r|
- [t("label_password_rule_#{r}"), r]
- end %></div>
+ <div class="form--field -wide-label">
+ <% rules = OpenProject::Passwords::Evaluator.known_rules.map do |rule|
+ [t("label_password_rule_#{rule}"), rule]
+ end %>
+ <%= setting_multiselect :password_active_rules, rules %>
+ </div>
<div class="form--field -wide-label"><%= setting_text_field :password_min_adhered_rules, size: 6, container_class: '-xslim' %></div>
<div class="form--field -wide-label"><%= setting_text_field :password_days_valid, size: 6, container_class: '-xslim' %>
<span class="form--field-instructions">