forked from External/greenlight
32 lines
878 B
Ruby
32 lines
878 B
Ruby
# frozen_string_literal: true
|
|
|
|
module ApplicationHelper
|
|
include MeetingsHelper
|
|
|
|
# Gets all configured omniauth providers.
|
|
def configured_providers
|
|
Rails.configuration.providers.select do |provider|
|
|
Rails.configuration.send("omniauth_#{provider}")
|
|
end
|
|
end
|
|
|
|
# Determines which providers can show a login button in the login modal.
|
|
def iconset_providers
|
|
configured_providers & [:google, :twitter]
|
|
end
|
|
|
|
# Generates the login URL for a specific provider.
|
|
def omniauth_login_url(provider)
|
|
"#{Rails.configuration.relative_url_root}/auth/#{provider}"
|
|
end
|
|
|
|
# Determine if Greenlight is configured to allow user signups.
|
|
def allow_user_signup?
|
|
Rails.configuration.allow_user_signup
|
|
end
|
|
|
|
def bigbluebutton_endpoint_default?
|
|
Rails.configuration.bigbluebutton_endpoint_default == Rails.configuration.bigbluebutton_endpoint
|
|
end
|
|
end
|