Sha256: 256d740bacff40aac08aa8c47423c03b4ef852e2615fa1dfc605de68ead99e75

Contents?: true

Size: 470 Bytes

Versions: 2

Compression:

Stored size: 470 Bytes

Contents

# frozen_string_literal: true

class JekyllAuth
  module Helpers
    def whitelisted?
      return true if request.path_info == "/logout"

      !!(JekyllAuth.whitelist && JekyllAuth.whitelist.match(request.path_info))
    end

    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
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jekyll-auth-2.1.3 lib/jekyll_auth/helpers.rb
jekyll-auth-2.1.2 lib/jekyll_auth/helpers.rb