From 8049ddbd011e1a37f75a3be263edc6d0fa12f3e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20M=C3=A9nab=C3=A9?= Date: Mon, 20 Apr 2020 21:25:25 +0200 Subject: [PATCH 1/5] Allow to set a filter for LDAP authentication (#1306) --- app/controllers/sessions_controller.rb | 1 + sample.env | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 33cfbf8a..2771cf5a 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -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? diff --git a/sample.env b/sample.env index 668813c1..15dd119f 100644 --- a/sample.env +++ b/sample.env @@ -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: From a11d79f1dc96db1892addb93af93c3120ad15c4e Mon Sep 17 00:00:00 2001 From: Jesus Federico Date: Tue, 21 Apr 2020 13:41:33 -0400 Subject: [PATCH 2/5] GRN2-xx: Updated i18n-language-mapping to 0.1.1 (#1361) Updated i18n-language-mapping to 0.1.1 --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index b02b1687..dd06d104 100644 --- a/Gemfile +++ b/Gemfile @@ -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' diff --git a/Gemfile.lock b/Gemfile.lock index 451d84a9..97bbd336 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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 From dadc57d9eaefa1f5ce9fb74a8d6c37fe380936bc Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2020 13:54:39 -0400 Subject: [PATCH 3/5] Translate /config/locales/en.yml in zh_CN (#1356) translation completed for the source file '/config/locales/en.yml' on the 'zh_CN' language. Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> Co-authored-by: Jesus Federico --- config/locales/zh_CN.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/locales/zh_CN.yml b/config/locales/zh_CN.yml index 05b1c15b..8d15295d 100644 --- a/config/locales/zh_CN.yml +++ b/config/locales/zh_CN.yml @@ -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: 笔记 From 855694c716fc72aac06fc690d26038e6e4312bf3 Mon Sep 17 00:00:00 2001 From: Ahmad Farhat Date: Wed, 22 Apr 2020 09:46:21 -0400 Subject: [PATCH 4/5] Store a random user id for unauthenticated users as a cookie (#1364) --- app/controllers/concerns/joiner.rb | 18 +++++++++++++++++- spec/controllers/rooms_controller_spec.rb | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/app/controllers/concerns/joiner.rb b/app/controllers/concerns/joiner.rb index 22643122..445d2b20 100644 --- a/app/controllers/concerns/joiner.rb +++ b/app/controllers/concerns/joiner.rb @@ -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 @@ -92,4 +93,19 @@ module Joiner recording_default_visibility: @settings.get_value("Default Recording Visibility") == "public" } 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 diff --git a/spec/controllers/rooms_controller_spec.rb b/spec/controllers/rooms_controller_spec.rb index be8f384b..72f8ea4b 100644 --- a/spec/controllers/rooms_controller_spec.rb +++ b/spec/controllers/rooms_controller_spec.rb @@ -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 From b08b1ff013857f71aab947a4239f0527a54d717a Mon Sep 17 00:00:00 2001 From: Ahmad Farhat Date: Tue, 28 Apr 2020 13:04:04 -0400 Subject: [PATCH 5/5] GRN2-xx: Fixed translation location for room status (#1378) * Fixed translation location for room status * Added more missing translations --- app/views/admins/components/_server_room_row.html.erb | 6 +++--- config/locales/en.yml | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/admins/components/_server_room_row.html.erb b/app/views/admins/components/_server_room_row.html.erb index eaf6a083..f874452e 100644 --- a/app/views/admins/components/_server_room_row.html.erb +++ b/app/views/admins/components/_server_room_row.html.erb @@ -36,9 +36,9 @@ <% 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 %> @@ -48,7 +48,7 @@