From 8ea5c6777b569f7f8d1bcae9b89c7e1ed701e161 Mon Sep 17 00:00:00 2001 From: kobros-tech Date: Tue, 31 Dec 2024 13:38:29 +0300 Subject: [PATCH] [18.0][MIG] auth_oauth_multi_token: Migration to 18.0 --- auth_oauth_multi_token/README.rst | 11 ++++++----- auth_oauth_multi_token/__manifest__.py | 2 +- auth_oauth_multi_token/readme/CONTRIBUTORS.md | 1 + auth_oauth_multi_token/static/description/index.html | 7 ++++--- auth_oauth_multi_token/tests/test_multi_token.py | 7 ++++++- auth_oauth_multi_token/views/res_users.xml | 4 ++-- 6 files changed, 20 insertions(+), 12 deletions(-) diff --git a/auth_oauth_multi_token/README.rst b/auth_oauth_multi_token/README.rst index 3297091986..8b272cac8c 100644 --- a/auth_oauth_multi_token/README.rst +++ b/auth_oauth_multi_token/README.rst @@ -17,13 +17,13 @@ OAuth Multi Token :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--auth-lightgray.png?logo=github - :target: https://github.com/OCA/server-auth/tree/17.0/auth_oauth_multi_token + :target: https://github.com/OCA/server-auth/tree/18.0/auth_oauth_multi_token :alt: OCA/server-auth .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/server-auth-17-0/server-auth-17-0-auth_oauth_multi_token + :target: https://translation.odoo-community.org/projects/server-auth-18-0/server-auth-18-0-auth_oauth_multi_token :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/server-auth&target_branch=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/server-auth&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -50,7 +50,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. @@ -76,6 +76,7 @@ Contributors - Stéphane Bidoul - Dan Tillinghast - Miku Laitinen +- Mohamed Alkobrosli Maintainers ----------- @@ -90,6 +91,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/server-auth `_ project on GitHub. +This module is part of the `OCA/server-auth `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/auth_oauth_multi_token/__manifest__.py b/auth_oauth_multi_token/__manifest__.py index 6b9800ba66..7c12a37f76 100644 --- a/auth_oauth_multi_token/__manifest__.py +++ b/auth_oauth_multi_token/__manifest__.py @@ -4,7 +4,7 @@ { "name": "OAuth Multi Token", - "version": "17.0.1.0.0", + "version": "18.0.1.0.0", "license": "AGPL-3", "author": "Florent de Labarre, Camptocamp, Odoo Community Association (OCA)", "summary": """Allow multiple connection with the same OAuth account""", diff --git a/auth_oauth_multi_token/readme/CONTRIBUTORS.md b/auth_oauth_multi_token/readme/CONTRIBUTORS.md index dfc9f829b4..8850769d98 100644 --- a/auth_oauth_multi_token/readme/CONTRIBUTORS.md +++ b/auth_oauth_multi_token/readme/CONTRIBUTORS.md @@ -6,3 +6,4 @@ - Stéphane Bidoul \<\> - Dan Tillinghast - Miku Laitinen +- Mohamed Alkobrosli \<\> diff --git a/auth_oauth_multi_token/static/description/index.html b/auth_oauth_multi_token/static/description/index.html index 17877204e4..2866ce35c9 100644 --- a/auth_oauth_multi_token/static/description/index.html +++ b/auth_oauth_multi_token/static/description/index.html @@ -369,7 +369,7 @@

OAuth Multi Token

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:5d69848be1a2005788b0912d52d59e788ed05ce24855822272fcdb20489ad6cc !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/server-auth Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/server-auth Translate me on Weblate Try me on Runboat

This module adds the possibility to connect with the same account on more than one device at the same time.

All providers are supported (Google, Facebook, Odoo, etc).

@@ -396,7 +396,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.

@@ -421,6 +421,7 @@

Contributors

  • Stéphane Bidoul <stephane.bidoul@acsone.eu>
  • Dan Tillinghast
  • Miku Laitinen
  • +
  • Mohamed Alkobrosli <malkobrosly@kencove.com>
  • @@ -432,7 +433,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/server-auth project on GitHub.

    +

    This module is part of the OCA/server-auth project on GitHub.

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

    diff --git a/auth_oauth_multi_token/tests/test_multi_token.py b/auth_oauth_multi_token/tests/test_multi_token.py index f63affd9b8..1c68ff1e7a 100644 --- a/auth_oauth_multi_token/tests/test_multi_token.py +++ b/auth_oauth_multi_token/tests/test_multi_token.py @@ -1,6 +1,7 @@ # Copyright 2017 Camptocamp # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) +import base64 import json from odoo import exceptions @@ -26,8 +27,12 @@ def setUpClass(cls): ) def _fake_params(self, **kw): + # in version 18.0 tokens should follow version check + # based on verify_hash_signed method + fake_token = b"\x01" + b"FAKE_TOKEN" + encoded_token = base64.urlsafe_b64encode(fake_token).rstrip(b"=").decode() params = { - "state": json.dumps({"t": "FAKE_TOKEN"}), + "state": json.dumps({"t": encoded_token}), "access_token": "FAKE_ACCESS_TOKEN", } params.update(kw) diff --git a/auth_oauth_multi_token/views/res_users.xml b/auth_oauth_multi_token/views/res_users.xml index 4fb146d97c..d0c8ce6eff 100644 --- a/auth_oauth_multi_token/views/res_users.xml +++ b/auth_oauth_multi_token/views/res_users.xml @@ -17,9 +17,9 @@ nolabel="1" options="{'no_create': True, 'no_open': True}" > - + - +