forked from External/greenlight
Merge branch 'master' of https://github.com/bigbluebutton/greenlight2
This commit is contained in:
@ -5,6 +5,13 @@ require 'bigbluebutton_api'
|
||||
class ApplicationController < ActionController::Base
|
||||
include SessionsHelper
|
||||
|
||||
before_action :migration_error?
|
||||
|
||||
# Show an information page when migration fails and there is a version error.
|
||||
def migration_error?
|
||||
render :migration_error unless ENV["DB_MIGRATE_FAILED"].blank?
|
||||
end
|
||||
|
||||
protect_from_forgery with: :exception
|
||||
|
||||
MEETING_NAME_LIMIT = 90
|
||||
@ -56,7 +63,7 @@ class ApplicationController < ActionController::Base
|
||||
user_is_moderator: false,
|
||||
meeting_logout_url: request.base_url + logout_room_path(@room),
|
||||
meeting_recorded: true,
|
||||
moderator_message: "#{invite_msg}\n\n #{request.base_url + relative_root + room_path(@room)}",
|
||||
moderator_message: "#{invite_msg}\n\n #{request.base_url + room_path(@room)}",
|
||||
}
|
||||
end
|
||||
end
|
||||
|
@ -65,8 +65,9 @@ class RoomsController < ApplicationController
|
||||
|
||||
# DELETE /:room_uid
|
||||
def destroy
|
||||
p @room
|
||||
# Don't delete the users home room.
|
||||
@room.destroy if @room != current_user.main_room
|
||||
@room.destroy if @room.owned_by?(current_user) && @room != current_user.main_room
|
||||
|
||||
redirect_to current_user.main_room
|
||||
end
|
||||
@ -90,14 +91,6 @@ class RoomsController < ApplicationController
|
||||
redirect_to @room
|
||||
end
|
||||
|
||||
# POST /:room_uid/home
|
||||
def home
|
||||
current_user.main_room = @room
|
||||
current_user.save
|
||||
|
||||
redirect_to @room
|
||||
end
|
||||
|
||||
# POST /:room_uid/:record_id
|
||||
def update_recording
|
||||
meta = {
|
||||
|
@ -19,18 +19,6 @@ class SessionsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
# POST /launch
|
||||
def launch
|
||||
# This will recieve a encoded POST from a launcher that
|
||||
# contains the provider, and all user information. The
|
||||
# launcher is what does the authentication, so we know
|
||||
# that the user is who they say they are. We just need
|
||||
# to use our secret to decode it and then log them in
|
||||
# to GreenLight (or sign them up).
|
||||
|
||||
# User.from_launch()
|
||||
end
|
||||
|
||||
# GET/POST /auth/:provider/callback
|
||||
def omniauth
|
||||
user = User.from_omniauth(request.env['omniauth.auth'])
|
||||
|
Reference in New Issue
Block a user