Skip to content
Snippets Groups Projects
Commit 190fc57f authored by farhatahmad's avatar farhatahmad Committed by Jesus Federico
Browse files

Added a BigBlueButton error page (#548)

parent c3d1ce3a
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,9 @@ class ApplicationController < ActionController::Base
before_action :set_user_domain
before_action :check_user_role
# Manually handle BigBlueButton errors
rescue_from BigBlueButton::BigBlueButtonException, with: :handle_bigbluebutton_error
# Force SSL for loadbalancer configurations.
before_action :redirect_to_https
......@@ -147,4 +150,9 @@ class ApplicationController < ActionController::Base
end
end
helper_method :check_user_role
# Manually Handle BigBlueButton errors
def handle_bigbluebutton_error
render "errors/bigbluebutton_error"
end
end
<%
# 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)
enter_your_name: Enter your name!
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:
message: Oh no! Looks like something went wrong on our end.
help: The error has been logged, we'll take a look!
......@@ -124,7 +128,6 @@ en:
unauthorized:
message: You do not have access to this application
help: If you believe this is a mistake, please contact your system administrator.
unprocessable:
message: Oops! Request is unprocessable.
help: Unfortunately this isn't a valid request.
......
......@@ -24,11 +24,13 @@ end
describe ApplicationController do
controller do
before_action :check_if_unbanned
def index
head :ok
end
def error
raise BigBlueButton::BigBlueButtonException
end
end
context "roles" do
......@@ -56,4 +58,13 @@ describe ApplicationController do
expect(response).to redirect_to(root_path)
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment