forked from External/greenlight
Replaced checkbox with dropdown (#552)
This commit is contained in:
@ -98,8 +98,8 @@ class RoomsController < ApplicationController
|
||||
|
||||
# POST /:room_uid
|
||||
def join
|
||||
# If this setting is turned on only authenticated users are allowed to join rooms
|
||||
room_authentication_required
|
||||
return redirect_to root_path,
|
||||
flash: { alert: I18n.t("administrator.site_settings.authentication.user-info") } if auth_required
|
||||
|
||||
opts = default_meeting_options
|
||||
unless @room.owned_by?(current_user)
|
||||
@ -275,11 +275,8 @@ class RoomsController < ApplicationController
|
||||
redirect_to admins_path if current_user && current_user&.has_role?(:super_admin)
|
||||
end
|
||||
|
||||
def room_authentication_required
|
||||
if Setting.find_or_create_by!(provider: user_settings_provider).get_value("Room Authentication") == "true" &&
|
||||
current_user.nil?
|
||||
flash[:alert] = I18n.t("administrator.site_settings.authentication.user-info")
|
||||
redirect_to signin_path
|
||||
end
|
||||
def auth_required
|
||||
Setting.find_or_create_by!(provider: user_settings_provider).get_value("Room Authentication") == "true" &&
|
||||
current_user.nil?
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user