From 84fb61500524b1be0e1a304e1d508e0d696ead90 Mon Sep 17 00:00:00 2001 From: etiennevvv <59622352+etiennevvv@users.noreply.github.com> Date: Wed, 18 Mar 2020 15:19:16 -0400 Subject: [PATCH] GRN2-283: Fixed bug where users can't join a shared room (Fixed #989) (#995) * GRN2-283: Fixed bug where users can't join a shared room * GRN2-283: Fixed bug where users can't join a shared room * GRN2-283: Fixed bug where users can't join a shared room Co-authored-by: Ahmad Farhat --- app/controllers/rooms_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/rooms_controller.rb b/app/controllers/rooms_controller.rb index 2f4440d8..edb1f294 100644 --- a/app/controllers/rooms_controller.rb +++ b/app/controllers/rooms_controller.rb @@ -93,7 +93,7 @@ class RoomsController < ApplicationController return redirect_to root_path, flash: { alert: I18n.t("administrator.site_settings.authentication.user-info") } if auth_required - unless @room.owned_by?(current_user) + unless @room.owned_by?(current_user) || room_shared_with_user # Don't allow users to join unless they have a valid access code or the room doesn't have an access code if @room.access_code && !@room.access_code.empty? && @room.access_code != session[:access_code] return redirect_to room_path(room_uid: params[:room_uid]), flash: { alert: I18n.t("room.access_code_required") }