|
|
@ -50,9 +50,8 @@ module OpenProject::Costs::Patches::TimeEntryPatch |
|
|
|
(#{Project.allowed_to_condition(user, :view_own_hourly_rate, project: project)} AND #{TimeEntry.table_name}.user_id = #{user.id})) } |
|
|
|
(#{Project.allowed_to_condition(user, :view_own_hourly_rate, project: project)} AND #{TimeEntry.table_name}.user_id = #{user.id})) } |
|
|
|
view_time_entries = TimeEntry.visible_condition(user, project) |
|
|
|
view_time_entries = TimeEntry.visible_condition(user, project) |
|
|
|
|
|
|
|
|
|
|
|
{ include: [:project, :user], |
|
|
|
includes(:project, :user) |
|
|
|
conditions: [view_time_entries, view_hourly_rates].join(' AND ') |
|
|
|
.where([view_time_entries, view_hourly_rates].join(' AND ')) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|