Merge branch 'master' into room-settings

This commit is contained in:
Ahmad Farhat 2020-04-28 13:12:20 -04:00 committed by GitHub
commit 44bd2315b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 29 additions and 9 deletions

View File

@ -131,4 +131,4 @@ gem 'random_password'
# Adds helpers for the Google reCAPTCHA API
gem "recaptcha"
gem 'i18n-language-mapping', '~> 0.1.0'
gem 'i18n-language-mapping', '~> 0.1.1'

View File

@ -142,7 +142,7 @@ GEM
http_accept_language (2.1.1)
i18n (1.6.0)
concurrent-ruby (~> 1.0)
i18n-language-mapping (0.1.0)
i18n-language-mapping (0.1.1)
jaro_winkler (1.5.3)
jbuilder (2.9.1)
activesupport (>= 4.2.0)
@ -364,7 +364,7 @@ DEPENDENCIES
font-awesome-sass (~> 5.9.0)
hiredis
http_accept_language
i18n-language-mapping (~> 0.1.0)
i18n-language-mapping (~> 0.1.1)
jbuilder (~> 2.5)
jquery-rails (~> 4.3.3)
jquery-ui-rails

View File

@ -62,7 +62,8 @@ module Joiner
redirect_to join_path(@room, current_user.name, opts, current_user.uid)
else
join_name = params[:join_name] || params[@room.invite_path][:join_name]
redirect_to join_path(@room, join_name, opts)
redirect_to join_path(@room, join_name, opts, fetch_guest_id)
end
else
search_params = params[@room.invite_path] || params
@ -114,5 +115,19 @@ module Joiner
when "disabled"
false
end
private
def fetch_guest_id
return cookies[:guest_id] if cookies[:guest_id].present?
guest_id = "gl-guest-#{SecureRandom.hex(12)}"
cookies[:guest_id] = {
value: guest_id,
expires: 1.day.from_now
}
guest_id
end
end

View File

@ -138,6 +138,7 @@ class SessionsController < ApplicationController
'start_tls'
end
ldap_config[:base] = ENV['LDAP_BASE']
ldap_config[:filter] = ENV['LDAP_FILTER']
ldap_config[:uid] = ENV['LDAP_UID']
if params[:session][:username].blank? || session_params[:password].blank?

View File

@ -36,9 +36,9 @@
<td class="text-left">
<% running = room_is_running(room.bbb_id) %>
<% if running %>
<%= t("administrator.rooms.running") %>
<%= t("administrator.rooms.table.running") %>
<% else %>
<%= t("administrator.rooms.not_running") %>
<%= t("administrator.rooms.table.not_running") %>
<% end %>
</td>
<td class="text-center">
@ -48,7 +48,7 @@
</a>
<div class="dropdown-menu dropdown-menu-right">
<%= link_to room_path(room), class: "dropdown-item" do %>
<i class="dropdown-icon far fa-eye"></i> <%= t("administrator.rooms.view") %>
<i class="dropdown-icon far fa-eye"></i> <%= t("administrator.rooms.table.view") %>
<% end %>
<%= button_to start_room_path(room), class: "dropdown-item", "data-disable": "" do %>
<i class="dropdown-icon fas fa-door-open"></i> <%= running ? t("room.join") : t("room.start") %>

View File

@ -162,6 +162,7 @@ en:
delete: Delete
edit: Edit
edit_roles: Edit the user roles
merge: Merge
perm_delete: Permanently Delete
unban: Unban User
undelete: Undelete

View File

@ -42,6 +42,7 @@ zh_CN:
info: 更改左上角显示的网站标志
placeholder: 品牌形象URL地址
title: 网站标志
invalid: 无效的URL
cache:
info: 清除缓存,强制新请求获取已更新的信息
title: 清除网站缓存
@ -426,7 +427,7 @@ zh_CN:
visibility: 可见性
formats: 格式
visibility:
public: 公开
public: 公开
unlisted: 隐藏
format:
notes: 笔记

View File

@ -65,6 +65,7 @@ OAUTH2_REDIRECT=
# LDAP_BIND_DN=cn=admin,dc=example,dc=com
# LDAP_PASSWORD=password
# LDAP_ROLE_FIELD=ou
# LDAP_FILTER=(&(attr1=value1)(attr2=value2))
LDAP_SERVER=
LDAP_PORT=
LDAP_METHOD=
@ -74,6 +75,7 @@ LDAP_BIND_DN=
LDAP_AUTH=
LDAP_PASSWORD=
LDAP_ROLE_FIELD=
LDAP_FILTER=
# Set this to true if you want GreenLight to support user signup and login without
# Omniauth. For more information, see:

View File

@ -248,7 +248,7 @@ describe RoomsController, type: :controller do
allow_any_instance_of(BigBlueButton::BigBlueButtonApi).to receive(:is_meeting_running?).and_return(true)
post :join, params: { room_uid: @room, join_name: "Join Name" }
expect(response).to redirect_to(join_path(@owner.main_room, "Join Name", {}))
expect(response).to redirect_to(join_path(@owner.main_room, "Join Name", {}, response.cookies["guest_id"]))
end
it "should render wait if meeting isn't running" do