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

Move bim engine registration in prepare

Oliver Güntherca32144ffa57
diff --git a/modules/bim/lib/open_project/bim/engine.rb b/modules/bim/lib/open_project/bim/engine.rb
index 712c4976301..878a9f2780d 100644
--- a/modules/bim/lib/open_project/bim/engine.rb
+++ b/modules/bim/lib/open_project/bim/engine.rb
@@ -199,18 +199,16 @@ module OpenProject::Bim
Mime::Type.register "application/octet-stream", :bcfzip unless Mime::Type.lookup_by_extension(:bcfzip)
end
- initializer 'bim.bcf.add_api_scope' do |app|
- app.config.before_initialize do
- Doorkeeper.configuration.scopes.add(:bcf_v2_1)
+ config.to_prepare do
+ Doorkeeper.configuration.scopes.add(:bcf_v2_1)
- module OpenProject::Authentication::Scope
- BCF_V2_1 = :bcf_v2_1
- end
+ module OpenProject::Authentication::Scope
+ BCF_V2_1 = :bcf_v2_1
+ end
- OpenProject::Authentication.update_strategies(OpenProject::Authentication::Scope::BCF_V2_1,
- store: false) do |_strategies|
- %i[oauth session]
- end
+ OpenProject::Authentication.update_strategies(OpenProject::Authentication::Scope::BCF_V2_1,
+ store: false) do |_strategies|
+ %i[oauth session]
end
end