From 0838c292eac48ec7e93ae3c4b6e90080a831dc35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Bol=C3=ADvar?= Date: Thu, 16 May 2024 14:01:47 +0200 Subject: [PATCH] Use ENV variable for Odoo sign out custom URL --- .../concerns/decidim/devise/sessions_controller_override.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/concerns/decidim/devise/sessions_controller_override.rb b/app/controllers/concerns/decidim/devise/sessions_controller_override.rb index ae2a56e..bf5f0aa 100644 --- a/app/controllers/concerns/decidim/devise/sessions_controller_override.rb +++ b/app/controllers/concerns/decidim/devise/sessions_controller_override.rb @@ -15,8 +15,9 @@ def destroy end def after_sign_out_path_for(resource) - if @user.odoo_identity? - "https://oficinavirtual.somconnexio.coop" + url = ENV.fetch("ODOO_SIGN_OUT_URL", nil) + if @user.odoo_identity? && url + url else original_after_sign_out_path_for(resource) end