Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix: Remove obsolete required params when using direct upload

Wieland Lindenthalda876e4fec01
diff --git a/modules/bim/app/controllers/bim/ifc_models/ifc_models_controller.rb b/modules/bim/app/controllers/bim/ifc_models/ifc_models_controller.rb
index 168743612f5..a208ad12a63 100644
--- a/modules/bim/app/controllers/bim/ifc_models/ifc_models_controller.rb
+++ b/modules/bim/app/controllers/bim/ifc_models/ifc_models_controller.rb
@@ -201,9 +201,15 @@ module Bim
end
def permitted_model_params
- params
- .require(:bim_ifc_models_ifc_model)
- .permit('title', 'ifc_attachment', 'is_default')
+ require_params.permit('title', 'ifc_attachment', 'is_default')
+ end
+
+ def require_params
+ if OpenProject::Configuration.direct_uploads?
+ params
+ else
+ params.require(:bim_ifc_models_ifc_model)
+ end
end
def find_ifc_model_object