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
Do not display project infos on the index page
Klaus Zandersda9dc2070e76
diff --git a/app/components/projects/row_component.html.erb b/app/components/projects/row_component.html.erbindex 079fdd97e47..0a88ea78563 100644--- a/app/components/projects/row_component.html.erb+++ b/app/components/projects/row_component.html.erb@@ -70,7 +70,7 @@ See COPYRIGHT and LICENSE files for more details.<% end %></td></tr>-<% if project.description.present? %>+<% if User.current.allowed_in_project?(:view_project, project) && project.description.present? %><tr class="project-description <%= project_css_classes %> <%= row_css_level_classes %> <%= params[:expand] == 'all' ? '-expanded' : '' %>"data-project-target="descriptionRow"data-project-id="<%= project.id %>">diff --git a/app/components/projects/row_component.rb b/app/components/projects/row_component.rbindex 9f2fdaf1d90..0c284e98375 100644--- a/app/components/projects/row_component.rb+++ b/app/components/projects/row_component.rb@@ -52,6 +52,8 @@ module Projectsenddef custom_field_column(column)+ return nil unless user_can_view_project?+cf = custom_field(column)custom_value = project.formatted_custom_value_for(cf)@@ -92,6 +94,8 @@ module Projectsenddef project_status+ return nil unless user_can_view_project?+content = ''.html_safestatus_code = project.status_code@@ -106,6 +110,8 @@ module Projectsenddef status_explanation+ return nil unless user_can_view_project?+if project.status_explanationcontent_tag :div, helpers.format_text(project.status_explanation), class: 'wiki'end@@ -165,5 +171,9 @@ module Projects"format-#{cf.field_format}#{formattable}"endend++ def user_can_view_project?+ User.current.allowed_in_project?(:view_project, project)+ endendend