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

Fix tests after replacig method

Klaus Zanders68b06de622cc
diff --git a/modules/costs/lib/costs/engine.rb b/modules/costs/lib/costs/engine.rb
index ab1094f58b0..7ed864fe3da 100644
--- a/modules/costs/lib/costs/engine.rb
+++ b/modules/costs/lib/costs/engine.rb
@@ -174,8 +174,8 @@ module Costs
link :logCosts,
cache_if: -> {
- current_user.allowed_in_project?(:log_costs, context: represented.project) ||
- current_user.allowed_in_project?(:log_own_costs, context: represented.project)
+ current_user.allowed_in_project?(:log_costs, represented.project) ||
+ current_user.allowed_in_project?(:log_own_costs, represented.project)
} do
next unless represented.costs_enabled? && represented.persisted?
@@ -188,8 +188,8 @@ module Costs
link :showCosts,
cache_if: -> {
- current_user.allowed_in_project?(:view_cost_entries, context: represented.project) ||
- current_user.allowed_in_project?(:view_own_cost_entries, context: represented.project)
+ current_user.allowed_in_project?(:view_cost_entries, represented.project) ||
+ current_user.allowed_in_project?(:view_own_cost_entries, represented.project)
} do
next unless represented.persisted? && represented.project.costs_enabled?