From a3f6a134528d012567d216bfb42ed882e05e559f Mon Sep 17 00:00:00 2001 From: "Aung Ko Ko Lin (Quartile)" <45355704+AungKoKoLin1997@users.noreply.github.com> Date: Mon, 25 Nov 2024 16:38:25 +0700 Subject: [PATCH] [4889][ADD] base_user_api_key_security (#102) * [ADD] base_user_api_key_security --- base_user_api_key_security/README.rst | 56 +++ base_user_api_key_security/__init__.py | 0 base_user_api_key_security/__manifest__.py | 17 + .../readme/DESCRIPTION.md | 2 + .../static/description/index.html | 409 ++++++++++++++++++ .../views/res_users_views.xml | 12 + .../odoo/addons/base_user_api_key_security | 1 + setup/base_user_api_key_security/setup.py | 6 + 8 files changed, 503 insertions(+) create mode 100644 base_user_api_key_security/README.rst create mode 100644 base_user_api_key_security/__init__.py create mode 100644 base_user_api_key_security/__manifest__.py create mode 100644 base_user_api_key_security/readme/DESCRIPTION.md create mode 100644 base_user_api_key_security/static/description/index.html create mode 100644 base_user_api_key_security/views/res_users_views.xml create mode 120000 setup/base_user_api_key_security/odoo/addons/base_user_api_key_security create mode 100644 setup/base_user_api_key_security/setup.py diff --git a/base_user_api_key_security/README.rst b/base_user_api_key_security/README.rst new file mode 100644 index 00000000..0bf879b8 --- /dev/null +++ b/base_user_api_key_security/README.rst @@ -0,0 +1,56 @@ +========================== +Base User Api Key Security +========================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:8c7f796a65f960796f67ab86afd309313925a750366d9745afa7a2ddf21411eb + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-qrtl%2Faxls--custom-lightgray.png?logo=github + :target: https://github.com/qrtl/axls-custom/tree/16.0/base_user_api_key_security + :alt: qrtl/axls-custom + +|badge1| |badge2| |badge3| + +This module restricts API key generation for internal users to all users +except those in the 'Settings' group. + +**Table of contents** + +.. contents:: + :local: + +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Quartile + +Maintainers +----------- + +This module is part of the `qrtl/axls-custom `_ project on GitHub. + +You are welcome to contribute. diff --git a/base_user_api_key_security/__init__.py b/base_user_api_key_security/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/base_user_api_key_security/__manifest__.py b/base_user_api_key_security/__manifest__.py new file mode 100644 index 00000000..1fa212e4 --- /dev/null +++ b/base_user_api_key_security/__manifest__.py @@ -0,0 +1,17 @@ +# Copyright 2024 Quartile +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Base User Api Key Security", + "version": "16.0.1.0.0", + "category": "Users", + "author": "Quartile", + "website": "https://www.quartile.co", + "license": "AGPL-3", + "depends": [ + "base", + ], + "data": [ + "views/res_users_views.xml", + ], + "installable": True, +} diff --git a/base_user_api_key_security/readme/DESCRIPTION.md b/base_user_api_key_security/readme/DESCRIPTION.md new file mode 100644 index 00000000..0bbf5583 --- /dev/null +++ b/base_user_api_key_security/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module restricts API key generation for internal users to all users +except those in the 'Settings' group. diff --git a/base_user_api_key_security/static/description/index.html b/base_user_api_key_security/static/description/index.html new file mode 100644 index 00000000..85b699ba --- /dev/null +++ b/base_user_api_key_security/static/description/index.html @@ -0,0 +1,409 @@ + + + + + +Base User Api Key Security + + + +
+

Base User Api Key Security

+ + +

Beta License: AGPL-3 qrtl/axls-custom

+

This module restricts API key generation for internal users to all users +except those in the ‘Settings’ group.

+

Table of contents

+ +
+

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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Quartile
  • +
+
+
+

Maintainers

+

This module is part of the qrtl/axls-custom project on GitHub.

+

You are welcome to contribute.

+
+
+
+ + diff --git a/base_user_api_key_security/views/res_users_views.xml b/base_user_api_key_security/views/res_users_views.xml new file mode 100644 index 00000000..cfd2b170 --- /dev/null +++ b/base_user_api_key_security/views/res_users_views.xml @@ -0,0 +1,12 @@ + + + res.users.preferences.form.api_key_restrict + res.users + + + + base.group_system + + + + diff --git a/setup/base_user_api_key_security/odoo/addons/base_user_api_key_security b/setup/base_user_api_key_security/odoo/addons/base_user_api_key_security new file mode 120000 index 00000000..1a0db248 --- /dev/null +++ b/setup/base_user_api_key_security/odoo/addons/base_user_api_key_security @@ -0,0 +1 @@ +../../../../base_user_api_key_security \ No newline at end of file diff --git a/setup/base_user_api_key_security/setup.py b/setup/base_user_api_key_security/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/base_user_api_key_security/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)