Skip to content

Commit 112e1d4

Browse files
committed
[MIG] auth_oauth_multi_token: Migration to 18.0
1 parent c8c8297 commit 112e1d4

5 files changed

Lines changed: 17 additions & 12 deletions

File tree

auth_oauth_multi_token/README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ OAuth Multi Token
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--auth-lightgray.png?logo=github
20-
:target: https://github.com/OCA/server-auth/tree/17.0/auth_oauth_multi_token
20+
:target: https://github.com/OCA/server-auth/tree/18.0/auth_oauth_multi_token
2121
:alt: OCA/server-auth
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/server-auth-17-0/server-auth-17-0-auth_oauth_multi_token
23+
:target: https://translation.odoo-community.org/projects/server-auth-18-0/server-auth-18-0-auth_oauth_multi_token
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-auth&target_branch=17.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-auth&target_branch=18.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -50,7 +50,7 @@ Bug Tracker
5050
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-auth/issues>`_.
5151
In case of trouble, please check there if your issue has already been reported.
5252
If you spotted it first, help us to smash it by providing a detailed and welcomed
53-
`feedback <https://github.com/OCA/server-auth/issues/new?body=module:%20auth_oauth_multi_token%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
53+
`feedback <https://github.com/OCA/server-auth/issues/new?body=module:%20auth_oauth_multi_token%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
5454

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

@@ -93,6 +93,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
9393
mission is to support the collaborative development of Odoo features and
9494
promote its widespread use.
9595

96-
This module is part of the `OCA/server-auth <https://github.com/OCA/server-auth/tree/17.0/auth_oauth_multi_token>`_ project on GitHub.
96+
This module is part of the `OCA/server-auth <https://github.com/OCA/server-auth/tree/18.0/auth_oauth_multi_token>`_ project on GitHub.
9797

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

auth_oauth_multi_token/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{
66
"name": "OAuth Multi Token",
7-
"version": "17.0.1.0.0",
7+
"version": "18.0.1.0.0",
88
"license": "AGPL-3",
99
"author": "Florent de Labarre, Camptocamp, Odoo Community Association (OCA)",
1010
"summary": """Allow multiple connection with the same OAuth account""",

auth_oauth_multi_token/static/description/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ <h1 class="title">OAuth Multi Token</h1>
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370370
!! source digest: sha256:b00ecda1055b4e61c1978707ad4f5545ab39ddc15b2833f3ef5a65dd9be56e27
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-auth/tree/17.0/auth_oauth_multi_token"><img alt="OCA/server-auth" src="https://img.shields.io/badge/github-OCA%2Fserver--auth-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-auth-17-0/server-auth-17-0-auth_oauth_multi_token"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-auth&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-auth/tree/18.0/auth_oauth_multi_token"><img alt="OCA/server-auth" src="https://img.shields.io/badge/github-OCA%2Fserver--auth-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-auth-18-0/server-auth-18-0-auth_oauth_multi_token"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-auth&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373373
<p>This module adds the possibility to connect with the same account on
374374
more than one device at the same time.</p>
375375
<p>All providers are supported (Google, Facebook, Odoo, etc).</p>
@@ -396,7 +396,7 @@ <h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
396396
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-auth/issues">GitHub Issues</a>.
397397
In case of trouble, please check there if your issue has already been reported.
398398
If you spotted it first, help us to smash it by providing a detailed and welcomed
399-
<a class="reference external" href="https://github.com/OCA/server-auth/issues/new?body=module:%20auth_oauth_multi_token%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
399+
<a class="reference external" href="https://github.com/OCA/server-auth/issues/new?body=module:%20auth_oauth_multi_token%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
400400
<p>Do not contact contributors directly about support or help with technical issues.</p>
401401
</div>
402402
<div class="section" id="credits">
@@ -436,7 +436,7 @@ <h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
436436
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
437437
mission is to support the collaborative development of Odoo features and
438438
promote its widespread use.</p>
439-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-auth/tree/17.0/auth_oauth_multi_token">OCA/server-auth</a> project on GitHub.</p>
439+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-auth/tree/18.0/auth_oauth_multi_token">OCA/server-auth</a> project on GitHub.</p>
440440
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
441441
</div>
442442
</div>

auth_oauth_multi_token/tests/test_multi_token.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright 2017 Camptocamp
22
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
33

4+
import base64
45
import json
56

67
from odoo import exceptions
@@ -26,8 +27,12 @@ def setUpClass(cls):
2627
)
2728

2829
def _fake_params(self, **kw):
30+
# in version 18.0 tokens should follow version check
31+
# based on verify_hash_signed method
32+
fake_token = b"\x01" + b"FAKE_TOKEN"
33+
encoded_token = base64.urlsafe_b64encode(fake_token).rstrip(b"=").decode()
2934
params = {
30-
"state": json.dumps({"t": "FAKE_TOKEN"}),
35+
"state": json.dumps({"t": encoded_token}),
3136
"access_token": "FAKE_ACCESS_TOKEN",
3237
}
3338
params.update(kw)

auth_oauth_multi_token/views/res_users.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
nolabel="1"
1818
options="{'no_create': True, 'no_open': True}"
1919
>
20-
<tree limit="10">
20+
<list limit="10">
2121
<field name="create_date" />
22-
</tree>
22+
</list>
2323
</field>
2424
<button
2525
string="Clear Tokens"

0 commit comments

Comments
 (0)