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
better naming
as-op893165c135ff
diff --git a/app/models/work_package/exports/attributes.rb b/app/models/work_package/exports/attributes.rbindex cd3d0c5004e..8f81fc1fb5d 100644--- a/app/models/work_package/exports/attributes.rb+++ b/app/models/work_package/exports/attributes.rb@@ -30,14 +30,14 @@module WorkPackage::Exportsmodule Attributes- def user_allowed_view_wp_project_phase?(work_package)+ def allowed_to_view_wp_project_phase?(work_package)User.current.allowed_in_project?(:view_project_phases, work_package.project) &&work_package.project.phases.active.any?end- def user_allowed_view_attribute?(obj, attribute_name)+ def allowed_to_view_attribute?(obj, attribute_name)if attribute_name.to_sym == :project_phase && obj.is_a?(WorkPackage)- user_allowed_view_wp_project_phase?(obj)+ allowed_to_view_wp_project_phase?(obj)elsetrueenddiff --git a/app/models/work_package/exports/macros/attributes.rb b/app/models/work_package/exports/macros/attributes.rbindex 022aae0f9ce..32be596fdd3 100644--- a/app/models/work_package/exports/macros/attributes.rb+++ b/app/models/work_package/exports/macros/attributes.rb@@ -161,7 +161,7 @@ module WorkPackage::Exportsenddef self.can_view_attribute?(custom_field, obj, attribute_name)- !(custom_field.nil? && !user_allowed_view_attribute?(obj, attribute_name))+ !(custom_field.nil? && !allowed_to_view_attribute?(obj, attribute_name))enddef self.convert_to_attribute_name(custom_field, attribute, obj)diff --git a/app/models/work_package/pdf_export/export/wp/attributes.rb b/app/models/work_package/pdf_export/export/wp/attributes.rbindex dd4e0a8f51e..3a3240570f5 100644--- a/app/models/work_package/pdf_export/export/wp/attributes.rb+++ b/app/models/work_package/pdf_export/export/wp/attributes.rb@@ -161,7 +161,7 @@ module WorkPackage::PDFExport::Export::Wp::Attributesenddef show_attribute?(form_key, work_package)- CustomField.custom_field_attribute?(form_key) || user_allowed_view_attribute?(work_package, form_key)+ CustomField.custom_field_attribute?(form_key) || allowed_to_view_attribute?(work_package, form_key)enddef allowed_long_text_custom_field?(form_key, work_package)