Skip to content

Commit ce71c82

Browse files
committed
[MIG] base_rest_auth_jwt: Migration to 15.0
1 parent 274cfb5 commit ce71c82

10 files changed

Lines changed: 24 additions & 18 deletions

File tree

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
exclude: |
22
(?x)
33
# NOT INSTALLABLE ADDONS
4-
^base_rest_auth_jwt/|
54
^base_rest_auth_user_service/|
65
^graphql_base/|
76
^graphql_demo/|

base_rest_auth_jwt/README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ Base Rest Auth Jwt
1414
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
1515
:alt: License: LGPL-3
1616
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Frest--framework-lightgray.png?logo=github
17-
:target: https://github.com/OCA/rest-framework/tree/14.0/base_rest_auth_jwt
17+
:target: https://github.com/OCA/rest-framework/tree/15.0/base_rest_auth_jwt
1818
:alt: OCA/rest-framework
1919
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
20-
:target: https://translation.odoo-community.org/projects/rest-framework-14-0/rest-framework-14-0-base_rest_auth_jwt
20+
:target: https://translation.odoo-community.org/projects/rest-framework-15-0/rest-framework-15-0-base_rest_auth_jwt
2121
:alt: Translate me on Weblate
2222
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
23-
:target: https://runbot.odoo-community.org/runbot/271/14.0
23+
:target: https://runbot.odoo-community.org/runbot/271/15.0
2424
:alt: Try me on Runbot
2525

2626
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -40,7 +40,7 @@ Bug Tracker
4040
Bugs are tracked on `GitHub Issues <https://github.com/OCA/rest-framework/issues>`_.
4141
In case of trouble, please check there if your issue has already been reported.
4242
If you spotted it first, help us smashing it by providing a detailed and welcomed
43-
`feedback <https://github.com/OCA/rest-framework/issues/new?body=module:%20base_rest_auth_jwt%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
43+
`feedback <https://github.com/OCA/rest-framework/issues/new?body=module:%20base_rest_auth_jwt%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
4444

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

@@ -78,6 +78,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
7878

7979
|maintainer-lmignon|
8080

81-
This module is part of the `OCA/rest-framework <https://github.com/OCA/rest-framework/tree/14.0/base_rest_auth_jwt>`_ project on GitHub.
81+
This module is part of the `OCA/rest-framework <https://github.com/OCA/rest-framework/tree/15.0/base_rest_auth_jwt>`_ project on GitHub.
8282

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

base_rest_auth_jwt/__manifest__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"summary": """
77
Base Rest: Add support for the auth_jwt security policy into the
88
openapi documentation""",
9-
"version": "14.0.1.1.0",
9+
"version": "15.0.1.0.0",
1010
"license": "LGPL-3",
1111
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
1212
"website": "https://github.com/OCA/rest-framework",
1313
"depends": ["base_rest", "auth_jwt"],
1414
"maintainers": ["lmignon"],
15-
"installable": False,
15+
"installable": True,
1616
"auto_install": True,
1717
"external_dependencies": {
1818
"python": [

base_rest_auth_jwt/apispec/rest_method_security_plugin.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
class RestMethodSecurityPlugin(BasePlugin):
88
def __init__(self, service):
9-
super(RestMethodSecurityPlugin, self).__init__()
9+
super().__init__()
1010
self._service = service
1111

1212
def init_spec(self, spec):
13-
super(RestMethodSecurityPlugin, self).init_spec(spec)
13+
super().init_spec(spec)
1414
self.spec = spec
1515
self.openapi_version = spec.openapi_version
1616
jwt_scheme = {
@@ -21,13 +21,12 @@ def init_spec(self, spec):
2121
"description": "Enter JWT Bearer Token ** only **",
2222
}
2323
spec.components.security_scheme("jwt", jwt_scheme)
24+
return
2425

2526
def operation_helper(self, path=None, operations=None, **kwargs):
2627
routing = kwargs.get("routing")
2728
if not routing:
28-
super(RestMethodSecurityPlugin, self).operation_helper(
29-
path, operations, **kwargs
30-
)
29+
super().operation_helper(path, operations, **kwargs)
3130
if not operations:
3231
return
3332
auth = routing.get("auth", self.spec._params.get("default_auth"))

base_rest_auth_jwt/components/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class BaseRestService(AbstractComponent):
1010
_inherit = "base.rest.service"
1111

1212
def _get_api_spec(self, **params):
13-
spec = super(BaseRestService, self)._get_api_spec(**params)
13+
spec = super()._get_api_spec(**params)
1414
plugin = RestMethodSecurityPlugin(self)
1515
plugin.init_spec(spec)
1616
spec.plugins.append(plugin)

base_rest_auth_jwt/i18n/base_rest_auth_jwt.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
msgid ""
55
msgstr ""
6-
"Project-Id-Version: Odoo Server 14.0\n"
6+
"Project-Id-Version: Odoo Server 15.0\n"
77
"Report-Msgid-Bugs-To: \n"
88
"Last-Translator: \n"
99
"Language-Team: \n"

base_rest_auth_jwt/static/description/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ <h1 class="title">Base Rest Auth Jwt</h1>
367367
!! This file is generated by oca-gen-addon-readme !!
368368
!! changes will be overwritten. !!
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
370-
<p><a class="reference external" 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" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/rest-framework/tree/14.0/base_rest_auth_jwt"><img alt="OCA/rest-framework" src="https://img.shields.io/badge/github-OCA%2Frest--framework-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/rest-framework-14-0/rest-framework-14-0-base_rest_auth_jwt"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/271/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
370+
<p><a class="reference external" 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" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/rest-framework/tree/15.0/base_rest_auth_jwt"><img alt="OCA/rest-framework" src="https://img.shields.io/badge/github-OCA%2Frest--framework-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/rest-framework-15-0/rest-framework-15-0-base_rest_auth_jwt"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/271/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
371371
<p>This technical addon extend <cite>base_rest</cite> to add the support for auth_jwt
372372
authentication mechanism into the generated openapi documentation.</p>
373373
<p><strong>Table of contents</strong></p>
@@ -387,7 +387,7 @@ <h1><a class="toc-backref" href="#id1">Bug Tracker</a></h1>
387387
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/rest-framework/issues">GitHub Issues</a>.
388388
In case of trouble, please check there if your issue has already been reported.
389389
If you spotted it first, help us smashing it by providing a detailed and welcomed
390-
<a class="reference external" href="https://github.com/OCA/rest-framework/issues/new?body=module:%20base_rest_auth_jwt%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
390+
<a class="reference external" href="https://github.com/OCA/rest-framework/issues/new?body=module:%20base_rest_auth_jwt%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
391391
<p>Do not contact contributors directly about support or help with technical issues.</p>
392392
</div>
393393
<div class="section" id="credits">
@@ -413,7 +413,7 @@ <h2><a class="toc-backref" href="#id5">Maintainers</a></h2>
413413
promote its widespread use.</p>
414414
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
415415
<p><a class="reference external" href="https://github.com/lmignon"><img alt="lmignon" src="https://github.com/lmignon.png?size=40px" /></a></p>
416-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/rest-framework/tree/14.0/base_rest_auth_jwt">OCA/rest-framework</a> project on GitHub.</p>
416+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/rest-framework/tree/15.0/base_rest_auth_jwt">OCA/rest-framework</a> project on GitHub.</p>
417417
<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>
418418
</div>
419419
</div>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../base_rest_auth_jwt

setup/base_rest_auth_jwt/setup.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import setuptools
2+
3+
setuptools.setup(
4+
setup_requires=['setuptools-odoo'],
5+
odoo_addon=True,
6+
)

test-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
odoo-addon-auth_jwt @ git+https://github.com/OCA/server-auth@refs/pull/316/head#subdirectory=setup/auth_jwt

0 commit comments

Comments
 (0)