vendor/cache/ruby/2.3.0/gems/warden-github-rails-1.3.0/lib/warden/github/rails/routes.rb
# Enforces an authenticated GitHub user for the routes. If not
# authenticated, it initiates the OAuth flow.
#
# Team and organization memberships can be checked by specifying a hash
# such as `team: 'foobar'` or `org: 'my_company'`.
Enforces an authenticated GitHub user for the routes. If not
authenticated, it initiates the OAuth flow.

Team and organization memberships can be checked by specifying a hash
such as `team: 'foobar'` or `org: 'my_company'`.
Enforces an authenticated GitHub user for the routes . If not authenticated it initiates the OAuth flow . Team and organization memberships can be checked by specifying a hash such as ` team : ' foobar ' ` or ` org : ' my_company ' ` .
def github_enforce_options(user, options)
          if (teams = options[:team])
            Array(teams).any? { |team| user.team_member?(Rails.team_id(team)) }
          elsif (org = options[:org] || options[:organization])
            user.organization_member?(org)
          else
            true
          end
        end
def github_enforce_options ( user , options ) if ( teams = options [ :team ] ) Array ( teams ) . any? { | team | user . team_member? ( Rails . team_id ( team ) ) } elsif ( org = options [ :org ] || options [ :organization ] ) user . organization_member? ( org ) else true end end
Enforces an authenticated GitHub user for the routes.
Enforces an authenticated GitHub user for the routes .
user
<not_specific>
options
<not_specific>