From 38142b7a99c8ce8965fcc2b25fb767dc8f071ba4 Mon Sep 17 00:00:00 2001 From: Edilio Daciel Escalona Almira Date: Mon, 2 Dec 2024 17:46:13 -0500 Subject: [PATCH] [IMP] Do not enable recaptcha by default --- .../models/res_config_settings.py | 23 +++++++++++++++++++ website_recaptcha_v2_login/tests/__init__.py | 0 .../tests/test_recaptcha.py | 0 3 files changed, 23 insertions(+) create mode 100644 website_recaptcha_v2_login/models/res_config_settings.py create mode 100644 website_recaptcha_v2_login/tests/__init__.py create mode 100644 website_recaptcha_v2_login/tests/test_recaptcha.py diff --git a/website_recaptcha_v2_login/models/res_config_settings.py b/website_recaptcha_v2_login/models/res_config_settings.py new file mode 100644 index 0000000000..fa2e0cf47f --- /dev/null +++ b/website_recaptcha_v2_login/models/res_config_settings.py @@ -0,0 +1,23 @@ +# SPDX-FileCopyrightText: 2010-2014 Elico Corp +# SPDX-FileContributor: Augustin Cisterne-Kaas +# SPDX-FileCopyrightText: 2015 Tech-Receptives Solutions Pvt. Ltd. +# SPDX-FileCopyrightText: 2019 Simone Orsi - Camptocamp SA +# SPDX-FileCopyrightText: 2019 Coop IT Easy SC +# +# SPDX-License-Identifier: AGPL-3.0-or-later + +from odoo import fields, models + + +class ResConfigSettings(models.TransientModel): + _inherit = "res.config.settings" + + recaptcha_v2_enabled = fields.Boolean( + related="website_id.recaptcha_v2_enabled", readonly=False + ) + recaptcha_v2_site_key = fields.Char( + related="website_id.recaptcha_v2_site_key", readonly=False + ) + recaptcha_v2_secret_key = fields.Char( + related="website_id.recaptcha_v2_secret_key", readonly=False + ) diff --git a/website_recaptcha_v2_login/tests/__init__.py b/website_recaptcha_v2_login/tests/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/website_recaptcha_v2_login/tests/test_recaptcha.py b/website_recaptcha_v2_login/tests/test_recaptcha.py new file mode 100644 index 0000000000..e69de29bb2