forked from External/greenlight
Added a BigBlueButton error page (#548)
This commit is contained in:
parent
c3d1ce3a04
commit
190fc57f5e
|
@ -29,6 +29,9 @@ class ApplicationController < ActionController::Base
|
||||||
before_action :set_user_domain
|
before_action :set_user_domain
|
||||||
before_action :check_user_role
|
before_action :check_user_role
|
||||||
|
|
||||||
|
# Manually handle BigBlueButton errors
|
||||||
|
rescue_from BigBlueButton::BigBlueButtonException, with: :handle_bigbluebutton_error
|
||||||
|
|
||||||
# Force SSL for loadbalancer configurations.
|
# Force SSL for loadbalancer configurations.
|
||||||
before_action :redirect_to_https
|
before_action :redirect_to_https
|
||||||
|
|
||||||
|
@ -147,4 +150,9 @@ class ApplicationController < ActionController::Base
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
helper_method :check_user_role
|
helper_method :check_user_role
|
||||||
|
|
||||||
|
# Manually Handle BigBlueButton errors
|
||||||
|
def handle_bigbluebutton_error
|
||||||
|
render "errors/bigbluebutton_error"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
<%
|
||||||
|
# BigBlueButton open source conferencing system - http://www.bigbluebutton.org/.
|
||||||
|
# Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below).
|
||||||
|
# This program is free software; you can redistribute it and/or modify it under the
|
||||||
|
# terms of the GNU Lesser General Public License as published by the Free Software
|
||||||
|
# Foundation; either version 3.0 of the License, or (at your option) any later
|
||||||
|
# version.
|
||||||
|
#
|
||||||
|
# BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||||
|
# You should have received a copy of the GNU Lesser General Public License along
|
||||||
|
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
%>
|
||||||
|
|
||||||
|
<div class="container text-center pt-9">
|
||||||
|
<div class="display-1 text-muted mb-5"><%= I18n.t("errors.bigbluebutton.title") %></div>
|
||||||
|
<h1 class="h2 mb-3"><%= I18n.t("errors.bigbluebutton.message") %></h1>
|
||||||
|
<p class="h4 text-muted font-weight-normal mb-7"><%= I18n.t("errors.bigbluebutton.help", doc_link: "http://docs.bigbluebutton.org/greenlight/gl-install.html#setting-bigbluebutton-credentials").html_safe %></p>
|
||||||
|
</div>
|
|
@ -98,6 +98,10 @@ en:
|
||||||
email_sent: Your %{email_type} email has been sent! (Please check your Spam folder if you haven't received it)
|
email_sent: Your %{email_type} email has been sent! (Please check your Spam folder if you haven't received it)
|
||||||
enter_your_name: Enter your name!
|
enter_your_name: Enter your name!
|
||||||
errors:
|
errors:
|
||||||
|
bigbluebutton:
|
||||||
|
help: Please make sure the proper steps have been taken. <a href="%{doc_link}">Learn more</a>
|
||||||
|
message: Invalid BigBlueButton Endpoint and Secret
|
||||||
|
title: Server Error
|
||||||
internal:
|
internal:
|
||||||
message: Oh no! Looks like something went wrong on our end.
|
message: Oh no! Looks like something went wrong on our end.
|
||||||
help: The error has been logged, we'll take a look!
|
help: The error has been logged, we'll take a look!
|
||||||
|
@ -124,7 +128,6 @@ en:
|
||||||
unauthorized:
|
unauthorized:
|
||||||
message: You do not have access to this application
|
message: You do not have access to this application
|
||||||
help: If you believe this is a mistake, please contact your system administrator.
|
help: If you believe this is a mistake, please contact your system administrator.
|
||||||
|
|
||||||
unprocessable:
|
unprocessable:
|
||||||
message: Oops! Request is unprocessable.
|
message: Oops! Request is unprocessable.
|
||||||
help: Unfortunately this isn't a valid request.
|
help: Unfortunately this isn't a valid request.
|
||||||
|
|
|
@ -24,11 +24,13 @@ end
|
||||||
|
|
||||||
describe ApplicationController do
|
describe ApplicationController do
|
||||||
controller do
|
controller do
|
||||||
before_action :check_if_unbanned
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
head :ok
|
head :ok
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def error
|
||||||
|
raise BigBlueButton::BigBlueButtonException
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "roles" do
|
context "roles" do
|
||||||
|
@ -56,4 +58,13 @@ describe ApplicationController do
|
||||||
expect(response).to redirect_to(root_path)
|
expect(response).to redirect_to(root_path)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context "errors" do
|
||||||
|
it "renders a BigBlueButton error if a BigBlueButtonException occurrs" do
|
||||||
|
routes.draw { get "error" => "anonymous#error" }
|
||||||
|
|
||||||
|
get :error
|
||||||
|
expect(response).to render_template("errors/bigbluebutton_error")
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue