Commit bff20d760bc566825b0a304c10a63920a32a7e61

Authored by Arthur Nogueira Neves
2 parents ae98fd1a 6d6a4a35
Exists in master and in 1 other branch production

Merge pull request #831 from jlecour/patch-1

github_org_id can't match (String vs. Integer)
app/controllers/users/omniauth_callbacks_controller.rb
... ... @@ -8,7 +8,7 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
8 8 # See if they are a member of the organization that we have access for
9 9 # If they are, automatically create an account
10 10 client = Octokit::Client.new(access_token: github_token)
11   - org_ids = client.organizations.map { |org| org.id.to_s }
  11 + org_ids = client.organizations.map { |org| org.id }
12 12 if org_ids.include?(github_org_id)
13 13 github_user = User.create(name: env["omniauth.auth"].extra.raw_info.name, email: env["omniauth.auth"].extra.raw_info.email)
14 14 end
... ...