From ade8ed618bbd472312ac9e17a35462e86a21b1e3 Mon Sep 17 00:00:00 2001 From: Nils Coenen Date: Mon, 9 Dec 2024 16:09:19 +0100 Subject: [PATCH] [MIG] website_require_login: Migration to 18.0 --- website_require_login/README.rst | 12 ++++++------ website_require_login/__manifest__.py | 2 +- website_require_login/data/ir_actions.xml | 4 ++-- website_require_login/models/ir_http.py | 2 +- website_require_login/static/description/index.html | 8 ++++---- website_require_login/tests/test_ir_http.py | 2 +- website_require_login/views/website_auth_url.xml | 6 +++--- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/website_require_login/README.rst b/website_require_login/README.rst index 02e11ea3d7..d98b94c533 100644 --- a/website_require_login/README.rst +++ b/website_require_login/README.rst @@ -7,7 +7,7 @@ Website Login Required !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:8dc7356ff523514a2d820a2c3031c271e5ea73de8bd41bb7cb9fdc923b65a792 + !! source digest: sha256:a0f16f0655f6b5b9eec2c2e621f35dbcc40c69a3c5353dec8b07ddfab1874313 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -17,13 +17,13 @@ Website Login Required :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fwebsite-lightgray.png?logo=github - :target: https://github.com/OCA/website/tree/17.0/website_require_login + :target: https://github.com/OCA/website/tree/18.0/website_require_login :alt: OCA/website .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/website-17-0/website-17-0-website_require_login + :target: https://translation.odoo-community.org/projects/website-18-0/website-18-0-website_require_login :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/website&target_branch=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/website&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -51,7 +51,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -83,6 +83,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/website `_ project on GitHub. +This module is part of the `OCA/website `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/website_require_login/__manifest__.py b/website_require_login/__manifest__.py index e2e89e8aff..16e072f320 100644 --- a/website_require_login/__manifest__.py +++ b/website_require_login/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Website Login Required", "category": "Website", - "version": "17.0.1.0.0", + "version": "18.0.1.0.0", "author": "Advitus MB, Ooops, Odoo Community Association (OCA)", "website": "https://github.com/OCA/website", "license": "LGPL-3", diff --git a/website_require_login/data/ir_actions.xml b/website_require_login/data/ir_actions.xml index 0610a1832f..a7de940919 100644 --- a/website_require_login/data/ir_actions.xml +++ b/website_require_login/data/ir_actions.xml @@ -3,8 +3,8 @@ Authorization required URLs website.auth.url - tree - + list + current diff --git a/website_require_login/models/ir_http.py b/website_require_login/models/ir_http.py index bcfea63b96..b8271a1517 100644 --- a/website_require_login/models/ir_http.py +++ b/website_require_login/models/ir_http.py @@ -44,5 +44,5 @@ def _check_require_auth(cls): path = request.httprequest.path for auth_path in auth_paths: if auth_path == path or Path(auth_path) in Path(path).parents: - redirect_path = "/web/login?redirect=%s" % path + redirect_path = f"/web/login?redirect={path}" return request.redirect(redirect_path, code=302) diff --git a/website_require_login/static/description/index.html b/website_require_login/static/description/index.html index 8f195a72c4..740090d438 100644 --- a/website_require_login/static/description/index.html +++ b/website_require_login/static/description/index.html @@ -367,9 +367,9 @@

Website Login Required

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:8dc7356ff523514a2d820a2c3031c271e5ea73de8bd41bb7cb9fdc923b65a792 +!! source digest: sha256:a0f16f0655f6b5b9eec2c2e621f35dbcc40c69a3c5353dec8b07ddfab1874313 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: LGPL-3 OCA/website Translate me on Weblate Try me on Runboat

+

Beta License: LGPL-3 OCA/website Translate me on Weblate Try me on Runboat

This module allows to restrict access to specific website pages to logged users.

Table of contents

@@ -397,7 +397,7 @@

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -425,7 +425,7 @@

Maintainers

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/website project on GitHub.

+

This module is part of the OCA/website project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/website_require_login/tests/test_ir_http.py b/website_require_login/tests/test_ir_http.py index b599e46b32..6782fa377b 100644 --- a/website_require_login/tests/test_ir_http.py +++ b/website_require_login/tests/test_ir_http.py @@ -13,7 +13,7 @@ def setUpClass(cls): {"name": "Test User", "login": "test_user", "password": "12345"} ) cls.path = "/contactus" - cls.expected_path = "/web/login?redirect=%s" % cls.path + cls.expected_path = f"/web/login?redirect={cls.path}" def test_dispatch_unauthorized(self): # Test that a public user cannot access "/auth_path diff --git a/website_require_login/views/website_auth_url.xml b/website_require_login/views/website_auth_url.xml index c6842ca7aa..21344ecd50 100644 --- a/website_require_login/views/website_auth_url.xml +++ b/website_require_login/views/website_auth_url.xml @@ -1,13 +1,13 @@ - + website.auth.url website.auth.url - + - +