Module: Sinatra::Auth::Github::Helpers

Defined in:
lib/jekyll_auth/sinatra/auth/github.rb

Instance Method Summary collapse

Instance Method Details

#github_teams_authenticate!(teams) ⇒ Object

Like the native github_team_authenticate! but accepts an array of team ids



8
9
10
11
# File 'lib/jekyll_auth/sinatra/auth/github.rb', line 8

def github_teams_authenticate!(teams)
  authenticate!
  halt([401, "Unauthorized User"]) unless teams.any? { |team_id| github_team_access?(team_id) }
end