From 347ed2bdc152be6b9088157fefbb9acf679e2592 Mon Sep 17 00:00:00 2001 From: farhatahmad Date: Wed, 17 Jul 2019 14:05:28 -0400 Subject: [PATCH 1/2] Fixed issue with https redirect --- app/controllers/application_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 70df16a351..01482bfda6 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -23,6 +23,9 @@ class ApplicationController < ActionController::Base include SessionsHelper include ThemingHelper + # Force SSL for loadbalancer configurations. + before_action :redirect_to_https + before_action :migration_error? before_action :set_locale before_action :check_admin_password @@ -32,9 +35,6 @@ class ApplicationController < ActionController::Base # Manually handle BigBlueButton errors rescue_from BigBlueButton::BigBlueButtonException, with: :handle_bigbluebutton_error - # Force SSL for loadbalancer configurations. - before_action :redirect_to_https - protect_from_forgery with: :exception MEETING_NAME_LIMIT = 90 @@ -138,7 +138,7 @@ def set_user_domain # Checks to see if the user exists begin - retrieve_provider_info(@user_domain, 'api2', 'getUserGreenlightCredentials') + retrieve_provider_info(@user_domain + 't', 'api2', 'getUserGreenlightCredentials') rescue => e if e.message.eql? "No user with that id exists" render "errors/not_found", locals: { message: I18n.t("errors.not_found.user_not_found.message"), From 56be3a5b13fa71046681fbd5b48744f665f3b6fc Mon Sep 17 00:00:00 2001 From: farhatahmad Date: Wed, 17 Jul 2019 14:08:30 -0400 Subject: [PATCH 2/2] Removed left over testing code --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 01482bfda6..c5197b970b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -138,7 +138,7 @@ def set_user_domain # Checks to see if the user exists begin - retrieve_provider_info(@user_domain + 't', 'api2', 'getUserGreenlightCredentials') + retrieve_provider_info(@user_domain, 'api2', 'getUserGreenlightCredentials') rescue => e if e.message.eql? "No user with that id exists" render "errors/not_found", locals: { message: I18n.t("errors.not_found.user_not_found.message"),