2018-06-26 10:29:46 -04:00
|
|
|
# frozen_string_literal: true
|
2018-05-07 16:06:01 -04:00
|
|
|
|
2018-08-01 09:45:12 -04:00
|
|
|
# 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/>.
|
|
|
|
|
2018-06-26 10:29:46 -04:00
|
|
|
Rails.application.routes.draw do
|
2019-10-21 12:09:31 -04:00
|
|
|
get '/health_check', to: 'health_check#all'
|
2018-10-12 15:57:53 -04:00
|
|
|
|
2018-06-11 13:05:54 -04:00
|
|
|
# Error routes.
|
2019-05-03 13:05:12 -04:00
|
|
|
match '/401', to: 'errors#unauthorized', via: :all, as: :unauthorized
|
|
|
|
match '/404', to: 'errors#not_found', via: :all, as: :not_found
|
|
|
|
match '/500', to: 'errors#internal_error', via: :all, as: :internal_error
|
2018-06-11 13:05:54 -04:00
|
|
|
|
2019-05-03 13:05:12 -04:00
|
|
|
# Signin/Signup routes.
|
2019-08-27 11:08:58 -04:00
|
|
|
get '/signin', to: 'sessions#signin', as: :signin
|
|
|
|
get '/signup', to: 'sessions#new', as: :signup
|
2018-06-08 14:44:08 -04:00
|
|
|
post '/signup', to: 'users#create', as: :create_user
|
2019-08-27 11:08:58 -04:00
|
|
|
get '/ldap_signin', to: 'sessions#ldap_signin', as: :ldap_signin
|
2018-05-09 16:31:52 -04:00
|
|
|
|
2018-09-14 14:33:58 -04:00
|
|
|
# Redirect to terms page
|
|
|
|
match '/terms', to: 'users#terms', via: [:get, :post]
|
|
|
|
|
2019-05-03 13:05:12 -04:00
|
|
|
# Admin resouces
|
|
|
|
resources :admins, only: [:index]
|
|
|
|
|
|
|
|
scope '/admins' do
|
2019-08-19 11:28:48 -04:00
|
|
|
# Panel Tabs
|
2020-01-09 11:05:17 -05:00
|
|
|
get '/rooms', to: 'admins#server_rooms', as: :admin_rooms
|
2019-07-22 12:46:48 -04:00
|
|
|
get '/recordings', to: 'admins#server_recordings', as: :admin_recordings
|
2019-08-19 11:28:48 -04:00
|
|
|
get '/site_settings', to: 'admins#site_settings', as: :admin_site_settings
|
|
|
|
get '/roles', to: 'admins#roles', as: :admin_roles
|
|
|
|
# Manage Users
|
2019-05-03 13:05:12 -04:00
|
|
|
get '/edit/:user_uid', to: 'admins#edit_user', as: :admin_edit_user
|
|
|
|
post '/ban/:user_uid', to: 'admins#ban_user', as: :admin_ban
|
|
|
|
post '/unban/:user_uid', to: 'admins#unban_user', as: :admin_unban
|
2019-05-17 16:26:49 -04:00
|
|
|
post '/invite', to: 'admins#invite', as: :invite_user
|
|
|
|
post '/approve/:user_uid', to: 'admins#approve', as: :admin_approve
|
2019-08-14 10:21:58 -04:00
|
|
|
get '/reset', to: 'admins#reset', as: :admin_reset
|
2019-10-10 16:10:23 -04:00
|
|
|
post '/undelete', to: 'admins#undelete', as: :admin_undelete
|
2019-08-19 11:28:48 -04:00
|
|
|
# Site Settings
|
|
|
|
post '/update_settings', to: 'admins#update_settings', as: :admin_update_settings
|
|
|
|
post '/registration_method', to: 'admins#registration_method', as: :admin_change_registration
|
|
|
|
post '/coloring', to: 'admins#coloring', as: :admin_coloring
|
2019-08-21 14:45:22 -04:00
|
|
|
post '/clear_cache', to: 'admins#clear_cache', as: :admin_clear_cache
|
2019-08-19 11:28:48 -04:00
|
|
|
# Roles
|
2019-07-31 11:53:32 -04:00
|
|
|
post '/role', to: 'admins#new_role', as: :admin_new_role
|
|
|
|
patch 'roles/order', to: 'admins#change_role_order', as: :admin_roles_order
|
|
|
|
post '/role/:role_id', to: 'admins#update_role', as: :admin_update_role
|
|
|
|
delete 'role/:role_id', to: 'admins#delete_role', as: :admin_delete_role
|
2019-05-03 13:05:12 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
scope '/themes' do
|
|
|
|
get '/primary', to: 'themes#index', as: :themes_primary
|
|
|
|
end
|
|
|
|
|
2018-12-21 11:56:52 -05:00
|
|
|
# Password reset resources.
|
|
|
|
resources :password_resets, only: [:new, :create, :edit, :update]
|
|
|
|
|
2019-02-22 16:47:02 -05:00
|
|
|
# Account activation resources
|
|
|
|
scope '/account_activations' do
|
|
|
|
get '/', to: 'account_activations#show', as: :account_activation
|
|
|
|
get '/edit', to: 'account_activations#edit', as: :edit_account_activation
|
2019-04-05 14:54:36 -04:00
|
|
|
post '/resend', to: 'account_activations#resend', as: :resend_email
|
2019-02-22 16:47:02 -05:00
|
|
|
end
|
|
|
|
|
2018-06-15 16:21:00 -04:00
|
|
|
# User resources.
|
2018-06-18 10:28:47 -04:00
|
|
|
scope '/u' do
|
2018-06-15 16:21:00 -04:00
|
|
|
# Handles login of greenlight provider accounts.
|
2018-09-14 14:33:58 -04:00
|
|
|
post '/login', to: 'sessions#create', as: :create_session
|
2018-06-26 10:29:46 -04:00
|
|
|
|
2018-06-15 16:21:00 -04:00
|
|
|
# Log the user out of the session.
|
|
|
|
get '/logout', to: 'sessions#destroy'
|
2018-06-21 16:17:18 -04:00
|
|
|
|
2018-07-27 11:36:28 -04:00
|
|
|
# Account management.
|
2018-06-21 16:17:18 -04:00
|
|
|
get '/:user_uid/edit', to: 'users#edit', as: :edit_user
|
2019-08-19 11:28:48 -04:00
|
|
|
get '/:user_uid/change_password', to: 'users#change_password', as: :change_password
|
|
|
|
get '/:user_uid/delete_account', to: 'users#delete_account', as: :delete_account
|
2018-06-21 16:17:18 -04:00
|
|
|
patch '/:user_uid/edit', to: 'users#update', as: :update_user
|
2018-07-27 11:36:28 -04:00
|
|
|
delete '/:user_uid', to: 'users#destroy', as: :delete_user
|
2019-02-04 11:21:42 -05:00
|
|
|
|
|
|
|
# All user recordings
|
|
|
|
get '/:user_uid/recordings', to: 'users#recordings', as: :get_user_recordings
|
2018-06-15 16:21:00 -04:00
|
|
|
end
|
2018-05-09 16:31:52 -04:00
|
|
|
|
|
|
|
# Handles Omniauth authentication.
|
2018-05-10 15:03:59 -04:00
|
|
|
match '/auth/:provider/callback', to: 'sessions#omniauth', via: [:get, :post], as: :omniauth_session
|
2018-07-23 12:07:26 -04:00
|
|
|
get '/auth/failure', to: 'sessions#omniauth_fail'
|
2019-07-10 11:26:43 -04:00
|
|
|
post '/auth/ldap', to: 'sessions#ldap', as: :ldap_callback
|
2018-05-07 16:06:01 -04:00
|
|
|
|
2018-06-18 10:28:47 -04:00
|
|
|
# Room resources.
|
|
|
|
resources :rooms, only: [:create, :show, :destroy], param: :room_uid, path: '/'
|
|
|
|
|
2019-07-31 11:53:32 -04:00
|
|
|
# Join a room by UID
|
|
|
|
post '/room/join', to: 'rooms#join_specific_room', as: :join_room
|
|
|
|
|
2018-06-18 10:28:47 -04:00
|
|
|
# Extended room routes.
|
|
|
|
scope '/:room_uid' do
|
|
|
|
post '/', to: 'rooms#join'
|
2018-12-04 10:48:51 -05:00
|
|
|
patch '/', to: 'rooms#update', as: :update_room
|
2019-02-06 11:08:19 -05:00
|
|
|
post '/update_settings', to: 'rooms#update_settings'
|
2018-06-18 10:28:47 -04:00
|
|
|
post '/start', to: 'rooms#start', as: :start_room
|
|
|
|
get '/logout', to: 'rooms#logout', as: :logout_room
|
2019-07-22 13:12:44 -04:00
|
|
|
post '/login', to: 'rooms#login', as: :login_room
|
2019-03-12 13:50:20 -04:00
|
|
|
end
|
2018-06-26 10:29:46 -04:00
|
|
|
|
2019-03-12 13:50:20 -04:00
|
|
|
# Recording operations routes
|
|
|
|
scope '/:meetingID' do
|
2018-12-13 11:58:33 -05:00
|
|
|
# Manage recordings
|
2018-06-18 10:28:47 -04:00
|
|
|
scope '/:record_id' do
|
2019-08-19 11:28:48 -04:00
|
|
|
post '/', to: 'recordings#update', as: :update_recording
|
2019-08-27 11:08:58 -04:00
|
|
|
patch '/', to: 'recordings#rename', as: :rename_recording
|
2019-08-19 11:28:48 -04:00
|
|
|
delete '/', to: 'recordings#delete', as: :delete_recording
|
2018-06-18 10:28:47 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-05-07 16:06:01 -04:00
|
|
|
root to: 'main#index'
|
2018-05-22 16:58:11 -04:00
|
|
|
end
|