Skip to content

Commit 21507a8

Browse files
committed
Merge PR OCA#654 into 17.0
Signed-off-by simahawk
2 parents 58993c7 + dcdf86e commit 21507a8

19 files changed

+887
-0
lines changed

auth_api_key_group/README.rst

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
==================
2+
Auth API key group
3+
==================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:e231a34a3fe2c3a2a8c78305131ba9e90af3725f3cf0b0878d313439f511f6fe
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
18+
:alt: License: LGPL-3
19+
.. |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_api_key_group
21+
:alt: OCA/server-auth
22+
.. |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_api_key_group
24+
:alt: Translate me on Weblate
25+
.. |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
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
Allow grouping API keys together.
32+
33+
Grouping per se does nothing. This feature is supposed to be used by
34+
other modules to limit access to services or records based on groups of
35+
keys.
36+
37+
**Table of contents**
38+
39+
.. contents::
40+
:local:
41+
42+
Bug Tracker
43+
===========
44+
45+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-auth/issues>`_.
46+
In case of trouble, please check there if your issue has already been reported.
47+
If you spotted it first, help us to smash it by providing a detailed and welcomed
48+
`feedback <https://github.com/OCA/server-auth/issues/new?body=module:%20auth_api_key_group%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
49+
50+
Do not contact contributors directly about support or help with technical issues.
51+
52+
Credits
53+
=======
54+
55+
Authors
56+
-------
57+
58+
* Camptcamp
59+
60+
Contributors
61+
------------
62+
63+
- Simone Orsi <simone.orsi@camptocamp.com>
64+
- Son Ho sonhd@trobz.com
65+
66+
Other credits
67+
-------------
68+
69+
The migration of this module from 16.0 to 17.0 was financially supported
70+
by Camptocamp
71+
72+
Maintainers
73+
-----------
74+
75+
This module is maintained by the OCA.
76+
77+
.. image:: https://odoo-community.org/logo.png
78+
:alt: Odoo Community Association
79+
:target: https://odoo-community.org
80+
81+
OCA, or the Odoo Community Association, is a nonprofit organization whose
82+
mission is to support the collaborative development of Odoo features and
83+
promote its widespread use.
84+
85+
.. |maintainer-simahawk| image:: https://github.com/simahawk.png?size=40px
86+
:target: https://github.com/simahawk
87+
:alt: simahawk
88+
89+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
90+
91+
|maintainer-simahawk|
92+
93+
This module is part of the `OCA/server-auth <https://github.com/OCA/server-auth/tree/17.0/auth_api_key_group>`_ project on GitHub.
94+
95+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

auth_api_key_group/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models

auth_api_key_group/__manifest__.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright 2021 Camptcamp SA
2+
# @author: Simone Orsi <simone.orsi@camptocamp.com>
3+
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
4+
5+
{
6+
"name": "Auth API key group",
7+
"summary": """
8+
Allow grouping API keys together.
9+
10+
Grouping per se does nothing. This feature is supposed to be used by other modules
11+
to limit access to services or records based on groups of keys.
12+
""",
13+
"version": "17.0.1.0.0",
14+
"license": "LGPL-3",
15+
"website": "https://github.com/OCA/server-auth",
16+
"author": "Camptcamp,Odoo Community Association (OCA)",
17+
"maintainers": ["simahawk"],
18+
"depends": ["auth_api_key"],
19+
"data": [
20+
"security/ir.model.access.csv",
21+
"views/auth_api_key_view.xml",
22+
"views/auth_api_key_group_view.xml",
23+
],
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * auth_api_key_group
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 16.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: \n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
#. module: auth_api_key_group
17+
#: model:ir.model,name:auth_api_key_group.model_auth_api_key
18+
msgid "API Key"
19+
msgstr ""
20+
21+
#. module: auth_api_key_group
22+
#: model:ir.model,name:auth_api_key_group.model_auth_api_key_group
23+
msgid "API Key auth group"
24+
msgstr ""
25+
26+
#. module: auth_api_key_group
27+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group__auth_api_key_ids
28+
msgid "API Keys"
29+
msgstr ""
30+
31+
#. module: auth_api_key_group
32+
#: model:ir.actions.act_window,name:auth_api_key_group.auth_api_key_group_act_window
33+
#: model:ir.ui.menu,name:auth_api_key_group.auth_api_key_group_menu
34+
msgid "Auth Api Key Groups"
35+
msgstr ""
36+
37+
#. module: auth_api_key_group
38+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key__auth_api_key_group_ids
39+
msgid "Auth Groups"
40+
msgstr ""
41+
42+
#. module: auth_api_key_group
43+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group__code
44+
msgid "Code"
45+
msgstr ""
46+
47+
#. module: auth_api_key_group
48+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group__create_uid
49+
msgid "Created by"
50+
msgstr ""
51+
52+
#. module: auth_api_key_group
53+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group__create_date
54+
msgid "Created on"
55+
msgstr ""
56+
57+
#. module: auth_api_key_group
58+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group__display_name
59+
msgid "Display Name"
60+
msgstr ""
61+
62+
#. module: auth_api_key_group
63+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group__id
64+
msgid "ID"
65+
msgstr ""
66+
67+
#. module: auth_api_key_group
68+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group____last_update
69+
msgid "Last Modified on"
70+
msgstr ""
71+
72+
#. module: auth_api_key_group
73+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group__write_uid
74+
msgid "Last Updated by"
75+
msgstr ""
76+
77+
#. module: auth_api_key_group
78+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group__write_date
79+
msgid "Last Updated on"
80+
msgstr ""
81+
82+
#. module: auth_api_key_group
83+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group__name
84+
msgid "Name"
85+
msgstr ""

auth_api_key_group/i18n/it.po

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * auth_api_key_group
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 16.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2024-04-03 12:43+0000\n"
10+
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
11+
"Language-Team: none\n"
12+
"Language: it\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 4.17\n"
18+
19+
#. module: auth_api_key_group
20+
#: model:ir.model,name:auth_api_key_group.model_auth_api_key
21+
msgid "API Key"
22+
msgstr "Chiave API"
23+
24+
#. module: auth_api_key_group
25+
#: model:ir.model,name:auth_api_key_group.model_auth_api_key_group
26+
msgid "API Key auth group"
27+
msgstr "Gruppo autorizzazione chiave API"
28+
29+
#. module: auth_api_key_group
30+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group__auth_api_key_ids
31+
msgid "API Keys"
32+
msgstr "Chiavi API"
33+
34+
#. module: auth_api_key_group
35+
#: model:ir.actions.act_window,name:auth_api_key_group.auth_api_key_group_act_window
36+
#: model:ir.ui.menu,name:auth_api_key_group.auth_api_key_group_menu
37+
msgid "Auth Api Key Groups"
38+
msgstr "Gruppi autorizzazione chiave API"
39+
40+
#. module: auth_api_key_group
41+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key__auth_api_key_group_ids
42+
msgid "Auth Groups"
43+
msgstr "Gruppi autorizzazione"
44+
45+
#. module: auth_api_key_group
46+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group__code
47+
msgid "Code"
48+
msgstr "Codice"
49+
50+
#. module: auth_api_key_group
51+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group__create_uid
52+
msgid "Created by"
53+
msgstr "Creato da"
54+
55+
#. module: auth_api_key_group
56+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group__create_date
57+
msgid "Created on"
58+
msgstr "Creato il"
59+
60+
#. module: auth_api_key_group
61+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group__display_name
62+
msgid "Display Name"
63+
msgstr "Nome visualizzato"
64+
65+
#. module: auth_api_key_group
66+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group__id
67+
msgid "ID"
68+
msgstr "ID"
69+
70+
#. module: auth_api_key_group
71+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group____last_update
72+
msgid "Last Modified on"
73+
msgstr "Ultima modifica il"
74+
75+
#. module: auth_api_key_group
76+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group__write_uid
77+
msgid "Last Updated by"
78+
msgstr "Ultimo aggiornamento di"
79+
80+
#. module: auth_api_key_group
81+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group__write_date
82+
msgid "Last Updated on"
83+
msgstr "Ultimo aggiornamento il"
84+
85+
#. module: auth_api_key_group
86+
#: model:ir.model.fields,field_description:auth_api_key_group.field_auth_api_key_group__name
87+
msgid "Name"
88+
msgstr "Nome"

auth_api_key_group/models/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from . import auth_api_key
2+
from . import auth_api_key_group
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2021 Camptcamp SA
2+
# @author: Simone Orsi <simone.orsi@camptocamp.com>
3+
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
4+
5+
6+
from odoo import fields, models
7+
8+
9+
class AuthApiKey(models.Model):
10+
_inherit = "auth.api.key"
11+
12+
auth_api_key_group_ids = fields.Many2many(
13+
comodel_name="auth.api.key.group",
14+
relation="auth_api_key_group_rel",
15+
column1="key_id",
16+
column2="group_id",
17+
string="Auth Groups",
18+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2021 Camptcamp SA
2+
# @author: Simone Orsi <simone.orsi@camptocamp.com>
3+
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
4+
5+
6+
from odoo import fields, models
7+
8+
9+
class AuthApiKeyGroup(models.Model):
10+
"""Group API keys together."""
11+
12+
_name = "auth.api.key.group"
13+
_description = "API Key auth group"
14+
15+
name = fields.Char(required=True)
16+
code = fields.Char(required=True)
17+
auth_api_key_ids = fields.Many2many(
18+
comodel_name="auth.api.key",
19+
relation="auth_api_key_group_rel",
20+
column1="group_id",
21+
column2="key_id",
22+
string="API Keys",
23+
)

auth_api_key_group/pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Simone Orsi \<<simone.orsi@camptocamp.com>\>
2+
- Son Ho <sonhd@trobz.com>

auth_api_key_group/readme/CREDITS.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The migration of this module from 16.0 to 17.0 was financially supported by Camptocamp
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Allow grouping API keys together.
2+
3+
Grouping per se does nothing. This feature is supposed to be used by
4+
other modules to limit access to services or records based on groups of
5+
keys.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
2+
access_auth_api_key_group,access_auth_api_key_group,model_auth_api_key_group,base.group_system,1,1,1,1
9.23 KB
Loading

0 commit comments

Comments
 (0)