From 73ac67ae429a4738801247df323f07e5847c9956 Mon Sep 17 00:00:00 2001 From: farhatahmad Date: Wed, 1 Nov 2023 14:12:57 -0400 Subject: [PATCH] More fixes for local migrations --- app/controllers/api/v1/migrations/external_controller.rb | 5 +++++ app/services/meeting_starter.rb | 2 +- spec/controllers/admin/server_rooms_controller_spec.rb | 2 +- spec/services/meeting_starter_spec.rb | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/v1/migrations/external_controller.rb b/app/controllers/api/v1/migrations/external_controller.rb index 9a68ab20c8..fb649deed7 100644 --- a/app/controllers/api/v1/migrations/external_controller.rb +++ b/app/controllers/api/v1/migrations/external_controller.rb @@ -105,6 +105,11 @@ def create_user return render_error(status: :bad_request, errors: user&.errors&.to_a) unless user.save + if user_hash[:provider] != 'greenlight' + user.password_digest = nil + user.save(validations: false) + end + render_data status: :created end diff --git a/app/services/meeting_starter.rb b/app/services/meeting_starter.rb index 4575aef490..4d9d62b84c 100644 --- a/app/services/meeting_starter.rb +++ b/app/services/meeting_starter.rb @@ -64,7 +64,7 @@ def computed_options(access_code:) logoutURL: room_url, meta_endCallbackUrl: meeting_ended_url(host: @base_url), 'meta_bbb-recording-ready-url': recording_ready_url(host: @base_url), - 'meta_bbb-origin-version': 3, + 'meta_bbb-origin-version': ENV.fetch('VERSION_TAG', 'v3'), 'meta_bbb-origin': 'greenlight' } end diff --git a/spec/controllers/admin/server_rooms_controller_spec.rb b/spec/controllers/admin/server_rooms_controller_spec.rb index b6d135b3be..10b2de3a77 100644 --- a/spec/controllers/admin/server_rooms_controller_spec.rb +++ b/spec/controllers/admin/server_rooms_controller_spec.rb @@ -154,7 +154,7 @@ def bbb_meetings hasJoinedVoice: 'false', hasVideo: 'false', clientType: 'HTML5' } }, - metadata: { 'bbb-origin-version': '3', + metadata: { 'bbb-origin-version': 'v3', 'bbb-recording-ready-url': 'http://localhost:3000/recording_ready', 'bbb-origin': 'greenlight', endcallbackurl: 'http://localhost:3000/meeting_ended' }, diff --git a/spec/services/meeting_starter_spec.rb b/spec/services/meeting_starter_spec.rb index 8877c3eb1e..275f606f64 100644 --- a/spec/services/meeting_starter_spec.rb +++ b/spec/services/meeting_starter_spec.rb @@ -41,7 +41,7 @@ logoutURL: url, meta_endCallbackUrl: File.join(base_url, '/meeting_ended'), 'meta_bbb-recording-ready-url': File.join(base_url, '/recording_ready'), - 'meta_bbb-origin-version': 3, + 'meta_bbb-origin-version': 'v3', 'meta_bbb-origin': 'greenlight', setting: 'value' }