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

add badge icon to all enterprise feture menu item except openid

bsatarnejadac3346b8bd31
diff --git a/config/initializers/menus.rb b/config/initializers/menus.rb
index 3eb4b6e9bf7..8bc6781f2c2 100644
--- a/config/initializers/menus.rb
+++ b/config/initializers/menus.rb
@@ -201,7 +201,8 @@ Redmine::MenuManager.map :admin_menu do |menu|
{ controller: '/placeholder_users' },
if: Proc.new { User.current.admin? },
caption: :label_placeholder_user_plural,
- parent: :users_and_permissions
+ parent: :users_and_permissions,
+ enterprise_feature: 'placeholder_users'
menu.push :groups,
{ controller: '/groups' },
@@ -263,13 +264,15 @@ Redmine::MenuManager.map :admin_menu do |menu|
{ controller: '/custom_actions' },
if: Proc.new { User.current.admin? },
caption: :'custom_actions.plural',
- parent: :admin_work_packages
+ parent: :admin_work_packages,
+ enterprise_feature: 'custom_actions'
menu.push :attribute_help_texts,
{ controller: '/attribute_help_texts' },
caption: :'attribute_help_texts.label_plural',
icon: 'icon2 icon-help2',
- if: Proc.new { User.current.admin? }
+ if: Proc.new { User.current.admin? },
+ enterprise_feature: 'attribute_help_texts'
menu.push :enumerations,
{ controller: '/enumerations' },
@@ -388,7 +391,8 @@ Redmine::MenuManager.map :admin_menu do |menu|
{ controller: '/custom_styles', action: :show },
if: Proc.new { User.current.admin? },
caption: :label_custom_style,
- icon: 'icon2 icon-design'
+ icon: 'icon2 icon-design',
+ enterprise_feature: 'define_custom_style'
menu.push :colors,
{ controller: '/colors', action: 'index' },
diff --git a/modules/boards/lib/open_project/boards/engine.rb b/modules/boards/lib/open_project/boards/engine.rb
index 078236e5c99..729c2833b14 100644
--- a/modules/boards/lib/open_project/boards/engine.rb
+++ b/modules/boards/lib/open_project/boards/engine.rb
@@ -43,7 +43,8 @@ module OpenProject::Boards
{ controller: '/boards/boards', action: :index },
caption: :'boards.label_boards',
after: :work_packages,
- icon: 'icon2 icon-boards'
+ icon: 'icon2 icon-boards',
+ enterprise_feature: 'board_view'
menu :project_menu,
:board_menu,
diff --git a/modules/ldap_groups/lib/open_project/ldap_groups/engine.rb b/modules/ldap_groups/lib/open_project/ldap_groups/engine.rb
index 99fa437f9c9..1a2795ad3fd 100644
--- a/modules/ldap_groups/lib/open_project/ldap_groups/engine.rb
+++ b/modules/ldap_groups/lib/open_project/ldap_groups/engine.rb
@@ -15,7 +15,8 @@ module OpenProject::LdapGroups
{ controller: '/ldap_groups/synchronized_groups', action: :index },
parent: :authentication,
last: true,
- caption: ->(*) { I18n.t('ldap_groups.label_menu_item') }
+ caption: ->(*) { I18n.t('ldap_groups.label_menu_item') },
+ enterprise_feature: 'ldap_groups'
end
add_cron_jobs { LdapGroups::SynchronizationJob }
diff --git a/modules/team_planner/lib/open_project/team_planner/engine.rb b/modules/team_planner/lib/open_project/team_planner/engine.rb
index 41f63043b1e..31c80611167 100644
--- a/modules/team_planner/lib/open_project/team_planner/engine.rb
+++ b/modules/team_planner/lib/open_project/team_planner/engine.rb
@@ -43,7 +43,8 @@ module OpenProject::TeamPlanner
{ controller: '/team_planner/team_planner', action: :index },
caption: :'team_planner.label_team_planner_plural',
after: :work_packages,
- icon: 'icon2 icon-team-planner'
+ icon: 'icon2 icon-team-planner',
+ enterprise_feature: 'team_planner_view'
menu :project_menu,
:team_planner_menu,
diff --git a/modules/two_factor_authentication/lib/open_project/two_factor_authentication/engine.rb b/modules/two_factor_authentication/lib/open_project/two_factor_authentication/engine.rb
index 03ee3c8d0bd..6b8e81811b5 100644
--- a/modules/two_factor_authentication/lib/open_project/two_factor_authentication/engine.rb
+++ b/modules/two_factor_authentication/lib/open_project/two_factor_authentication/engine.rb
@@ -34,7 +34,8 @@ module OpenProject::TwoFactorAuthentication
{ controller: '/two_factor_authentication/two_factor_settings', action: :show },
caption: ->(*) { I18n.t('two_factor_authentication.label_two_factor_authentication') },
parent: :authentication,
- if: ->(*) { ::OpenProject::TwoFactorAuthentication::TokenStrategyManager.configurable_by_ui? }
+ if: ->(*) { ::OpenProject::TwoFactorAuthentication::TokenStrategyManager.configurable_by_ui? },
+ enterprise_feature: 'two_factor_authentication'
end
patches %i[User]