From a1d56bb33898670374685665fb3f838ddb671a97 Mon Sep 17 00:00:00 2001 From: Luciano Becerra Date: Thu, 15 Oct 2020 15:39:19 -0300 Subject: [PATCH 1/3] Disable linter on commit --- bin/setup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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' From a80d2df6aa25ee4dbb2ea89e8e9e119d0ef3e420 Mon Sep 17 00:00:00 2001 From: Luciano Becerra Date: Thu, 15 Oct 2020 15:39:29 -0300 Subject: [PATCH 2/3] Add development credentials --- .env.sample | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 57eb815ce50837db3e0c70fa1e8b3de30e5db3be Mon Sep 17 00:00:00 2001 From: Luciano Becerra Date: Thu, 15 Oct 2020 15:40:14 -0300 Subject: [PATCH 3/3] Skip organization validation --- app/controllers/callbacks_controller.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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