forked from External/greenlight
add guest landing page when guest access disabled
This commit is contained in:
BIN
app/assets/images/signin-icon.png
Normal file
BIN
app/assets/images/signin-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
@ -18,12 +18,13 @@ class LandingController < ApplicationController
|
||||
include BbbApi
|
||||
|
||||
def index
|
||||
redirect_to user_login_path if Rails.configuration.disable_guest_access
|
||||
# If guest access is disabled, redirect the user to the guest landing and force login.
|
||||
redirect_to guest_path if Rails.configuration.disable_guest_access
|
||||
end
|
||||
|
||||
def resource
|
||||
if Rails.configuration.disable_guest_access && params[:resource] == 'meetings'
|
||||
redirect_to user_login_path
|
||||
redirect_to guest_path
|
||||
else
|
||||
if params[:id].size > meeting_name_limit
|
||||
redirect_to root_url, flash: {danger: t('meeting_name_long')}
|
||||
@ -38,6 +39,11 @@ class LandingController < ApplicationController
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def guest
|
||||
# If someone tries to aceess the guest landing when guest access is enabled, just send them to root.
|
||||
redirect_to root_url unless Rails.configuration.disable_guest_access
|
||||
end
|
||||
|
||||
def send_meetings_data
|
||||
render json: {active: bbb.get_meetings, waiting: WaitingList.waiting}
|
||||
|
44
app/views/landing/guest.html.erb
Normal file
44
app/views/landing/guest.html.erb
Normal file
@ -0,0 +1,44 @@
|
||||
<%
|
||||
# BigBlueButton open source conferencing system - http://www.bigbluebutton.org/.
|
||||
# Copyright (c) 2016 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="page-wrapper meetings">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="center-panel-wrapper">
|
||||
<%= render layout: 'shared/center_panel' do %>
|
||||
<h1 class='text-center'><%= t('welcome_to_greenlight') %></h1>
|
||||
<br>
|
||||
<%= link_to user_login_path, class: "signin-link" do %>
|
||||
<div class="signin-button center-block">
|
||||
<div class="signin-icon-wrapper">
|
||||
<%= image_tag("signin-icon.png", alt: "L", class: "signin-icon") %>
|
||||
</div>
|
||||
<div class="signin-text-wrapper text-center">
|
||||
<span class="signin-text"><%= t('login_greenlight') %></span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<br>
|
||||
<p class='text-center' style='font-size: 13px;'> <%= t('guest_sentence_one_html', bbb_link: link_to('BigBlueButton',
|
||||
'http://bigbluebutton.org/', target: "_blank")) %><br><%= t('guest_sentence_two') %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="text-center" style="padding-top:20px;">
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/yGX3JCv7OVM" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user