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 <ahmad.af.farhat@gmail.com>
This commit is contained in:
etiennevvv 2020-03-18 15:19:16 -04:00 committed by GitHub
parent e670260f29
commit 84fb615005
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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") }