GRN2-xx: Fixed issue with room join (#779)

* Fixed issue with room join

* Rspec fix
This commit is contained in:
Ahmad Farhat
2019-09-05 15:50:19 -04:00
committed by Jesus Federico
parent 201a394813
commit 061b69f962
3 changed files with 21 additions and 0 deletions

View File

@ -72,6 +72,8 @@ class RoomsController < ApplicationController
render :cant_create_rooms
end
else
return redirect_to root_path, flash: { alert: I18n.t("room.invalid_provider") } if incorrect_user_domain
# Get users name
@name = if current_user
current_user.name
@ -356,4 +358,8 @@ class RoomsController < ApplicationController
render :wait
end
end
def incorrect_user_domain
Rails.configuration.loadbalanced_configuration && @room.owner.provider != @user_domain
end
end