From ec59393e96f0b5f9d79b29f625adc2c5eb296a1e Mon Sep 17 00:00:00 2001 From: Matias Garcia Isaia Date: Wed, 24 May 2023 14:12:01 -0300 Subject: [PATCH] Disable Devise sign ups if Guisso is enabled If we offload authorisations to Guisso, then avoid local users sign ups. Guisso is CAPTCHA-protected, so we'd rather use it for production than add CATPCHA protections to each InSTEDD app. --- config/routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index a8474897e..48da3d6d0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -30,7 +30,7 @@ match '/' => 'home#index', :as => 'home' - devise_for :accounts, controllers: {omniauth_callbacks: "omniauth_callbacks" , sessions: "sessions"} + devise_for :accounts, :skip => [ ( :registrations if Guisso.enabled? ) ], controllers: {omniauth_callbacks: "omniauth_callbacks" , sessions: "sessions"} guisso_for :account resources :feeds, controller: :feed_server do