Now check for the correct permission.

git-svn-id: https://dev.finn.de/svn/cockpit/trunk@430 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
hjust 15 years ago
parent 347d90035b
commit 83d19e0c0e
  1. 4
      app/models/variable_cost_object.rb

@ -33,7 +33,7 @@ class VariableCostObject < CostObject
end end
def spent_material def spent_material
@spent_material ||= cost_entries.visible(User.current, self.project).sum("CASE @spent_material ||= cost_entries.visible_costs(User.current, self.project).sum("CASE
WHEN #{CostEntry.table_name}.overridden_costs IS NULL THEN WHEN #{CostEntry.table_name}.overridden_costs IS NULL THEN
#{CostEntry.table_name}.costs #{CostEntry.table_name}.costs
ELSE ELSE
@ -41,7 +41,7 @@ class VariableCostObject < CostObject
end end
def spent_labor def spent_labor
@spent_labor ||= time_entries.visible(User.current, self.project).sum("CASE @spent_labor ||= time_entries.visible_costs(User.current, self.project).sum("CASE
WHEN #{TimeEntry.table_name}.overridden_costs IS NULL THEN WHEN #{TimeEntry.table_name}.overridden_costs IS NULL THEN
#{TimeEntry.table_name}.costs #{TimeEntry.table_name}.costs
ELSE ELSE

Loading…
Cancel
Save