moved the permitted params into the workpackage_moves_controller, which is the only place it is used: This greens all moves-controller-specs

pull/413/head
Stefan Frank 11 years ago
parent fd5a3a29d0
commit d7f399ab8d
  1. 12
      app/controllers/work_packages/moves_controller.rb
  2. 1
      app/models/permitted_params.rb

@ -33,7 +33,17 @@ class WorkPackages::MovesController < ApplicationController
call_hook(:controller_work_packages_move_before_save, { :params => params, :work_package => work_package, :target_project => @target_project, :copy => !!@copy })
permitted_params = params.permit(*PermittedParams.permitted_attributes[:work_package_move])
permitted_params = params.permit(:copy,
:assigned_to_id,
:responsible_id,
:start_date,
:due_date,
:priority_id,
:follow,
:new_type_id,
:new_project_id,
ids:[],
status_id:[])
if r = work_package.move_to_project(@target_project, new_type, {:copy => @copy, :attributes => permitted_params})
moved_work_packages << r

@ -195,7 +195,6 @@ class PermittedParams < Struct.new(:params, :user)
end
end
],
:work_package_move =>[:assigned_to_id, :responsible_id, :status_id, :start_date, :due_date, :priority_id],
:color_move => [:move_to],
:color => [
:name,

Loading…
Cancel
Save