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

fix duplicate key :if in :ldap_authentication menu

Christophe Bliardfd64691c7c80
diff --git a/config/initializers/menus.rb b/config/initializers/menus.rb
index 970a6e5913c..3dc815082ad 100644
--- a/config/initializers/menus.rb
+++ b/config/initializers/menus.rb
@@ -327,11 +327,10 @@ Redmine::MenuManager.map :admin_menu do |menu|
menu.push :ldap_authentication,
{ controller: '/ldap_auth_sources', action: 'index' },
- if: Proc.new { User.current.admin? },
+ if: Proc.new { User.current.admin? && !OpenProject::Configuration.disable_password_login? },
parent: :authentication,
html: { class: 'server_authentication' },
- last: true,
- if: proc { !OpenProject::Configuration.disable_password_login? }
+ last: true
menu.push :oauth_applications,
{ controller: '/oauth/applications', action: 'index' },