From a18384150e058cb713e27bd7ed56002249c6cc88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Tue, 9 Apr 2019 18:26:01 +0200 Subject: [PATCH] [MIG] dbfilter_from_header: Migration to 12.0 --- dbfilter_from_header/README.rst | 67 ++- dbfilter_from_header/__manifest__.py | 17 +- dbfilter_from_header/readme/CONFIGURE.rst | 18 + dbfilter_from_header/readme/CONTRIBUTORS.rst | 9 + dbfilter_from_header/readme/DESCRIPTION.rst | 3 + dbfilter_from_header/readme/INSTALL.rst | 7 + dbfilter_from_header/readme/USAGE.rst | 2 + .../static/description/index.html | 462 ++++++++++++++++++ 8 files changed, 559 insertions(+), 26 deletions(-) create mode 100644 dbfilter_from_header/readme/CONFIGURE.rst create mode 100644 dbfilter_from_header/readme/CONTRIBUTORS.rst create mode 100644 dbfilter_from_header/readme/DESCRIPTION.rst create mode 100644 dbfilter_from_header/readme/INSTALL.rst create mode 100644 dbfilter_from_header/readme/USAGE.rst create mode 100644 dbfilter_from_header/static/description/index.html diff --git a/dbfilter_from_header/README.rst b/dbfilter_from_header/README.rst index e8f5a6cb8..f87147be1 100644 --- a/dbfilter_from_header/README.rst +++ b/dbfilter_from_header/README.rst @@ -1,15 +1,39 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - ==================== dbfilter_from_header ==================== +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-OCA%2Fserver--tools-lightgray.png?logo=github + :target: https://github.com/OCA/server-tools/tree/12.0/dbfilter_from_header + :alt: OCA/server-tools +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-dbfilter_from_header + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/149/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + This addon lets you pass a dbfilter as a HTTP header. This is interesting for setups where database names can't be mapped to proxied host names. +**Table of contents** + +.. contents:: + :local: + Installation ============ @@ -43,19 +67,32 @@ And make sure that proxy mode is enabled in Odoo's configuration file: ``proxy_mode = True`` +Usage +===== + +To use this module, you need to complete installation and configuration +parts. + 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 smashing it by providing a detailed and welcomed feedback. +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 smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= +Authors +~~~~~~~ + +* Therp BV + Contributors ------------- +~~~~~~~~~~~~ * Stéphane Bidoul * Yannick Vaucher @@ -67,17 +104,19 @@ Contributors * Jos De Graeve * Lai Tim Siu (Quaritle Limited) -Maintainer ----------- +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - 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. -To contribute to this module, please visit https://odoo-community.org. +This module is part of the `OCA/server-tools `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/dbfilter_from_header/__manifest__.py b/dbfilter_from_header/__manifest__.py index 835579122..b9bd1e912 100644 --- a/dbfilter_from_header/__manifest__.py +++ b/dbfilter_from_header/__manifest__.py @@ -6,23 +6,16 @@ { "name": "dbfilter_from_header", "summary": "Filter databases with HTTP headers", - "version": "11.0.1.0.0", - "author": "Therp BV,Odoo Community Association (OCA)", + "version": "12.0.1.0.0", + "website": "https://github.com/OCA/server-tools", + "author": "Therp BV, " + "Odoo Community Association (OCA)", "license": "AGPL-3", "complexity": "normal", "category": "Tools", "depends": [ 'web', ], - "data": [ - ], - "js": [ - ], - "css": [ - ], "auto_install": False, - "installable": True, - "external_dependencies": { - 'python': [], - }, + 'installable': True, } diff --git a/dbfilter_from_header/readme/CONFIGURE.rst b/dbfilter_from_header/readme/CONFIGURE.rst new file mode 100644 index 000000000..11da21c49 --- /dev/null +++ b/dbfilter_from_header/readme/CONFIGURE.rst @@ -0,0 +1,18 @@ +Please keep in mind that the standard odoo dbfilter configuration is still +applied before looking at the regular expression in the header. + +* For nginx, use: + + ``proxy_set_header X-Odoo-dbfilter [your filter regex];`` + +* For caddy, use: + + ``proxy_header X-Odoo-dbfilter [your filter regex]`` + +* For Apache, use: + + ``RequestHeader set X-Odoo-dbfilter [your filter regex]`` + +And make sure that proxy mode is enabled in Odoo's configuration file: + +``proxy_mode = True`` diff --git a/dbfilter_from_header/readme/CONTRIBUTORS.rst b/dbfilter_from_header/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..3ce1edb3a --- /dev/null +++ b/dbfilter_from_header/readme/CONTRIBUTORS.rst @@ -0,0 +1,9 @@ +* Stéphane Bidoul +* Yannick Vaucher +* Alexandre Fayolle +* Holger Brunn +* Laurent Mignon (aka lmi) +* Sandy Carter +* Fabio Vilchez +* Jos De Graeve +* Lai Tim Siu (Quaritle Limited) diff --git a/dbfilter_from_header/readme/DESCRIPTION.rst b/dbfilter_from_header/readme/DESCRIPTION.rst new file mode 100644 index 000000000..8f058402a --- /dev/null +++ b/dbfilter_from_header/readme/DESCRIPTION.rst @@ -0,0 +1,3 @@ +This addon lets you pass a dbfilter as a HTTP header. + +This is interesting for setups where database names can't be mapped to proxied host names. diff --git a/dbfilter_from_header/readme/INSTALL.rst b/dbfilter_from_header/readme/INSTALL.rst new file mode 100644 index 000000000..07de52fd3 --- /dev/null +++ b/dbfilter_from_header/readme/INSTALL.rst @@ -0,0 +1,7 @@ +To install this module, you only need to add it to your addons, and load it as +a server-wide module. + +This can be done with the ``server_wide_modules`` parameter in ``/etc/odoo.conf`` +or with the ``--load`` command-line parameter + +``server_wide_modules = "web, dbfilter_from_header"`` diff --git a/dbfilter_from_header/readme/USAGE.rst b/dbfilter_from_header/readme/USAGE.rst new file mode 100644 index 000000000..873c97460 --- /dev/null +++ b/dbfilter_from_header/readme/USAGE.rst @@ -0,0 +1,2 @@ +To use this module, you need to complete installation and configuration +parts. diff --git a/dbfilter_from_header/static/description/index.html b/dbfilter_from_header/static/description/index.html new file mode 100644 index 000000000..7977bbfd2 --- /dev/null +++ b/dbfilter_from_header/static/description/index.html @@ -0,0 +1,462 @@ + + + + + + +dbfilter_from_header + + + +
+

dbfilter_from_header

+ + +

Beta License: AGPL-3 OCA/server-tools Translate me on Weblate Try me on Runbot

+

This addon lets you pass a dbfilter as a HTTP header.

+

This is interesting for setups where database names can’t be mapped to proxied host names.

+

Table of contents

+ +
+

Installation

+

To install this module, you only need to add it to your addons, and load it as +a server-wide module.

+

This can be done with the server_wide_modules parameter in /etc/odoo.conf +or with the --load command-line parameter

+

server_wide_modules = "web, dbfilter_from_header"

+
+
+

Configuration

+

Please keep in mind that the standard odoo dbfilter configuration is still +applied before looking at the regular expression in the header.

+
    +
  • For nginx, use:

    +

    proxy_set_header X-Odoo-dbfilter [your filter regex];

    +
  • +
  • For caddy, use:

    +

    proxy_header X-Odoo-dbfilter [your filter regex]

    +
  • +
  • For Apache, use:

    +

    RequestHeader set X-Odoo-dbfilter [your filter regex]

    +
  • +
+

And make sure that proxy mode is enabled in Odoo’s configuration file:

+

proxy_mode = True

+
+
+

Usage

+

To use this module, you need to complete installation and configuration +parts.

+
+
+

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 smashing it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Therp BV
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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-tools project on GitHub.

+

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

+
+
+
+ +