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

Don't check uploader if changed by system

Oliver Güntherf64312133890
diff --git a/modules/bim/app/contracts/bim/ifc_models/base_contract.rb b/modules/bim/app/contracts/bim/ifc_models/base_contract.rb
index d98bf621ef7..ac7e0a55e9b 100644
--- a/modules/bim/app/contracts/bim/ifc_models/base_contract.rb
+++ b/modules/bim/app/contracts/bim/ifc_models/base_contract.rb
@@ -54,7 +54,9 @@ module Bim
end
def user_is_uploader
- if model.uploader_id_changed? && model.uploader != user
+ return unless changed_by_user.include?('uploader_id')
+
+ if model.uploader != user
errors.add :uploader_id, :invalid
end
end