Sha256: 2e4488282b415ac4976025f699cfb8105358eda79e3ee4c7a73e915568e297c1

Contents?: true

Size: 398 Bytes

Versions: 3

Compression:

Stored size: 398 Bytes

Contents

# frozen_string_literal: true

module Sinatra
  module Auth
    module Github
      module Helpers
        # Like the native github_team_authenticate! but accepts an array of team ids
        def github_teams_authenticate!(teams)
          authenticate!
          halt([401, "Unauthorized User"]) unless teams.any? { |team_id| github_team_access?(team_id) }
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jekyll-auth-2.1.3 lib/jekyll_auth/sinatra/auth/github.rb
jekyll-auth-2.1.2 lib/jekyll_auth/sinatra/auth/github.rb
jekyll-auth-2.1.1 lib/jekyll_auth/sinatra/auth/github.rb