diff --git a/app/models/permitted_params.rb b/app/models/permitted_params.rb index e73125a995..87af81af3c 100644 --- a/app/models/permitted_params.rb +++ b/app/models/permitted_params.rb @@ -215,8 +215,9 @@ class PermittedParams end end - def type - params.require(:type).permit(*self.class.permitted_attributes[:type]) + def type(args = {}) + permitted = permitted_attributes(:type, args) + params.require(:type).permit(*permitted) end def type_move @@ -611,10 +612,12 @@ class PermittedParams :is_milestone, :is_default, :color_id, + Proc.new do |args| + { attribute_visibility: ::TypesHelper.work_package_form_attributes.keys } + end, project_ids: [], custom_field_ids: [], - attribute_visibility: - ::TypesHelper.work_package_form_attributes.keys], + ], user: [ :firstname, :lastname,