forked from External/greenlight
* 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:
parent
e670260f29
commit
84fb615005
|
@ -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") }
|
||||
|
|
Loading…
Reference in New Issue