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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Move feature decision check into the can_publish? method
Klaus Zanders1358215a0a0d
diff --git a/app/components/projects/index_page_header_component.html.erb b/app/components/projects/index_page_header_component.html.erbindex ef38c224301..dff8c5e76b1 100644--- a/app/components/projects/index_page_header_component.html.erb+++ b/app/components/projects/index_page_header_component.html.erb@@ -81,7 +81,7 @@endif query.persisted?- if can_publish? && OpenProject::FeatureDecisions.project_list_sharing_active?+ if can_publish?if query.public?menu.with_item(label: t(:button_unpublish),diff --git a/app/components/projects/index_page_header_component.rb b/app/components/projects/index_page_header_component.rbindex 34f7ed4b153..d5fab8b4e36 100644--- a/app/components/projects/index_page_header_component.rb+++ b/app/components/projects/index_page_header_component.rb@@ -85,7 +85,9 @@ class Projects::IndexPageHeaderComponent < ApplicationComponentdef can_rename? = may_save_as? && query.persisted? && query.user == current_user && !query.changed?def can_publish?- current_user.allowed_globally?(:manage_public_project_queries) && query.persisted?+ OpenProject::FeatureDecisions.project_list_sharing_active? &&+ current_user.allowed_globally?(:manage_public_project_queries) &&+ query.persisted?enddef show_state?