|
|
|
@ -326,23 +326,25 @@ class PermittedParams < Struct.new(:params, :user) |
|
|
|
|
:member => [ |
|
|
|
|
:role_ids => []], |
|
|
|
|
:new_work_package => [ |
|
|
|
|
:subject, |
|
|
|
|
# attributes common with :planning_element below |
|
|
|
|
:assigned_to_id, |
|
|
|
|
{ attachments: [:file, :description] }, |
|
|
|
|
:category_id, |
|
|
|
|
:description, |
|
|
|
|
:start_date, |
|
|
|
|
:done_ratio, |
|
|
|
|
:due_date, |
|
|
|
|
:parent_id, |
|
|
|
|
:assigned_to_id, |
|
|
|
|
:responsible_id, |
|
|
|
|
:type_id, |
|
|
|
|
:fixed_version_id, |
|
|
|
|
:estimated_hours, |
|
|
|
|
:done_ratio, |
|
|
|
|
:fixed_version_id, |
|
|
|
|
:parent_id, |
|
|
|
|
:priority_id, |
|
|
|
|
:category_id, |
|
|
|
|
:responsible_id, |
|
|
|
|
:start_date, |
|
|
|
|
:status_id, |
|
|
|
|
:type_id, |
|
|
|
|
:subject, |
|
|
|
|
# attributes unique to :new_work_package |
|
|
|
|
:notes, |
|
|
|
|
:lock_version, |
|
|
|
|
{ attachments: [:file, :description] }, |
|
|
|
|
Proc.new do |args| |
|
|
|
|
# avoid costly allowed_to? if the param is not there at all |
|
|
|
|
if args[:params]["work_package"].has_key?("watcher_user_ids") && |
|
|
|
@ -360,22 +362,25 @@ class PermittedParams < Struct.new(:params, :user) |
|
|
|
|
end |
|
|
|
|
end ], |
|
|
|
|
:planning_element => [ |
|
|
|
|
:subject, |
|
|
|
|
# attributes common with :new_work_package above |
|
|
|
|
:assigned_to_id, |
|
|
|
|
{ attachments: [:file, :description] }, |
|
|
|
|
:category_id, |
|
|
|
|
:description, |
|
|
|
|
:start_date, |
|
|
|
|
:done_ratio, |
|
|
|
|
:due_date, |
|
|
|
|
:note, |
|
|
|
|
:type_id, |
|
|
|
|
:status_id, |
|
|
|
|
:planning_element_status_comment, |
|
|
|
|
:parent_id, |
|
|
|
|
:responsible_id, |
|
|
|
|
:assigned_to_id, |
|
|
|
|
:fixed_version_id, |
|
|
|
|
:estimated_hours, |
|
|
|
|
:done_ratio, |
|
|
|
|
:fixed_version_id, |
|
|
|
|
:parent_id, |
|
|
|
|
:priority_id, |
|
|
|
|
:category_id, |
|
|
|
|
:responsible_id, |
|
|
|
|
:start_date, |
|
|
|
|
:status_id, |
|
|
|
|
:type_id, |
|
|
|
|
:subject, |
|
|
|
|
# attributes unique to planning_element |
|
|
|
|
:note, |
|
|
|
|
:planning_element_status_comment, |
|
|
|
|
:custom_fields => [ #json |
|
|
|
|
:id, |
|
|
|
|
:value, |
|
|
|
|