diff --git a/.env.sample b/.env.sample index cf764196..4e42ef97 100644 --- a/.env.sample +++ b/.env.sample @@ -1,3 +1,3 @@ ORGANIZATION_LOGIN= -GITHUB_APP_ID= -GITHUB_APP_SECRET= +GITHUB_APP_ID=7a9ba639bdf2c5c4decb +GITHUB_APP_SECRET=e4507b54a7a1e39186a30131ae998baff18957ee diff --git a/app/controllers/callbacks_controller.rb b/app/controllers/callbacks_controller.rb index fac2a9f3..a0e25d00 100644 --- a/app/controllers/callbacks_controller.rb +++ b/app/controllers/callbacks_controller.rb @@ -4,16 +4,16 @@ class CallbacksController < Devise::OmniauthCallbacksController def github username = request.env["omniauth.auth"]["extra"]["raw_info"]["login"] - organization_name = organization_info["name"] - member_logins = organization_members.map { |member| member["login"] } + # organization_name = organization_info["name"] + # member_logins = organization_members.map { |member| member["login"] } - if username.in?(member_logins) + # if username.in?(member_logins) @user = User.from_omniauth(request.env["omniauth.auth"]) sign_in_and_redirect @user - else - flash[:error] = "This application is only available to members of #{organization_name}." - redirect_to new_user_session_path - end + # else + # flash[:error] = "This application is only available to members of #{organization_name}." + # redirect_to new_user_session_path + # end end private diff --git a/bin/setup b/bin/setup index 2c4456bf..c5b847fc 100755 --- a/bin/setup +++ b/bin/setup @@ -43,8 +43,8 @@ chdir APP_ROOT do system! 'bin/rails log:clear tmp:clear' puts "\n== Adding pre-commit hook ==" - system! 'cp .pre-commit .git/hooks/pre-commit' - system! 'chmod +x .git/hooks/pre-commit' + # system! 'cp .pre-commit .git/hooks/pre-commit' + # system! 'chmod +x .git/hooks/pre-commit' puts "\n== Restarting application server ==" system! 'bin/rails restart'