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

Set `permissible_on` definitions on `reporting` module

Aaron Contreras5180cff39d04
diff --git a/modules/reporting/lib/open_project/reporting/engine.rb b/modules/reporting/lib/open_project/reporting/engine.rb
index e7ba7c9f131..d31ec7cea6a 100644
--- a/modules/reporting/lib/open_project/reporting/engine.rb
+++ b/modules/reporting/lib/open_project/reporting/engine.rb
@@ -42,8 +42,12 @@ module OpenProject::Reporting
# register reporting_module including permissions
project_module :costs do
- permission :save_cost_reports, { cost_reports: edit_actions }
- permission :save_private_cost_reports, { cost_reports: edit_actions }
+ permission :save_cost_reports,
+ { cost_reports: edit_actions },
+ permissible_on: :project
+ permission :save_private_cost_reports,
+ { cost_reports: edit_actions },
+ permissible_on: :project
end
Rails.application.reloader.to_prepare do