Quieten the hound

pull/2990/head
Alexander Bach 10 years ago
parent bec3e0723c
commit 83a54efc33
  1. 5
      lib/api/v3/work_packages/schema/work_package_schema_representer.rb
  2. 11
      lib/api/v3/work_packages/work_package_representer.rb
  3. 1
      lib/api/v3/work_packages/work_packages_shared_helpers.rb

@ -94,8 +94,9 @@ module API
schema :spent_time,
type: 'Duration',
writable: false,
show_if: -> (_) { current_user_allowed_to(:view_time_entries,
context: represented.project) }
show_if: -> (_) {
current_user_allowed_to(:view_time_entries, context: represented.project)
}
schema :percentage_done,
type: 'Integer',

@ -254,8 +254,9 @@ module API
datetime_formatter.format_duration_from_hours(represented.spent_hours)
end,
writeable: false,
if: -> (_) { current_user_allowed_to(:view_time_entries,
context: represented.project) }
if: -> (_) {
current_user_allowed_to(:view_time_entries, context: represented.project)
}
property :done_ratio,
as: :percentageDone,
render_nil: true,
@ -278,8 +279,10 @@ module API
property :watchers,
embedded: true,
exec_context: :decorator,
if: -> (*) { current_user_allowed_to(:view_work_package_watchers,
context: represented.project) }
if: -> (*) {
current_user_allowed_to(:view_work_package_watchers,
context: represented.project)
}
property :attachments,
embedded: true,

@ -81,7 +81,6 @@ module API
false
end
end
end
end
end

Loading…
Cancel
Save