Commit 6d6a4a3567ab00158907e47044a1c971136af8c9
1 parent
54fcbb97
Exists in
master
and in
1 other branch
use only integers for org ids
Actually, using "native" integers works too, and seems simpler.
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/controllers/users/omniauth_callbacks_controller.rb
@@ -8,8 +8,8 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController | @@ -8,8 +8,8 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController | ||
8 | # See if they are a member of the organization that we have access for | 8 | # See if they are a member of the organization that we have access for |
9 | # If they are, automatically create an account | 9 | # If they are, automatically create an account |
10 | client = Octokit::Client.new(access_token: github_token) | 10 | client = Octokit::Client.new(access_token: github_token) |
11 | - org_ids = client.organizations.map { |org| org.id.to_s } | ||
12 | - if org_ids.include?(github_org_id.to_s) | 11 | + org_ids = client.organizations.map { |org| org.id } |
12 | + if org_ids.include?(github_org_id) | ||
13 | github_user = User.create(name: env["omniauth.auth"].extra.raw_info.name, email: env["omniauth.auth"].extra.raw_info.email) | 13 | github_user = User.create(name: env["omniauth.auth"].extra.raw_info.name, email: env["omniauth.auth"].extra.raw_info.email) |
14 | end | 14 | end |
15 | end | 15 | end |