module BuntoAuth::Helpers

Public Instance Methods

authentication_strategy() click to toggle source
# File lib/bunto_auth/helpers.rb, line 8
def authentication_strategy
  if !ENV["GITHUB_TEAM_ID"].to_s.blank?
    :team
  elsif !ENV["GITHUB_TEAM_IDS"].to_s.blank?
    :teams
  elsif !ENV["GITHUB_ORG_NAME"].to_s.blank?
    :org
  end
end
whitelisted?() click to toggle source
# File lib/bunto_auth/helpers.rb, line 3
def whitelisted?
  return true if request.path_info == "/logout"
  !!(BuntoAuth.whitelist && BuntoAuth.whitelist.match(request.path_info))
end