forked from External/greenlight
add lb option
This commit is contained in:
@ -20,10 +20,21 @@ class ApplicationController < ActionController::Base
|
||||
|
||||
# Determines if the BigBlueButton endpoint is configured (or set to default).
|
||||
def bigbluebutton_endpoint_default?
|
||||
return false if loadbalanced_configuration?
|
||||
Rails.configuration.bigbluebutton_endpoint_default == Rails.configuration.bigbluebutton_endpoint
|
||||
end
|
||||
helper_method :bigbluebutton_endpoint_default?
|
||||
|
||||
def loadbalanced_configuration?
|
||||
Rails.configuration.loadbalanced_configuration
|
||||
end
|
||||
helper_method :loadbalanced_configuration?
|
||||
|
||||
def allow_greenlight_users?
|
||||
Rails.configuration.greenlight_accounts
|
||||
end
|
||||
helper_method :allow_greenlight_users?
|
||||
|
||||
private
|
||||
|
||||
# Ensure the user is logged into the room they are accessing.
|
||||
|
@ -6,8 +6,8 @@ class SessionsController < ApplicationController
|
||||
|
||||
# GET /logout
|
||||
def destroy
|
||||
logout if current_user
|
||||
head :no_content
|
||||
logout
|
||||
redirect_to root_path
|
||||
end
|
||||
|
||||
# POST /login
|
||||
@ -22,6 +22,18 @@ 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