Louis Baudoux c059341d2b [IMP] iap: improve IAP accounts deactivation
Setting IAP sandbox as the endpoint for IAP doesn't really neutralize
the IAP services, it only prevents buying credits for it.
The existing credits could still be consumed by mistake.

In this new version, the account is kept as is, but the "+disabled"
suffix is appended to it. This will effectively disable the service by
raising a `InsufficientCreditError` for every IAP transactions.

This solution has multiple advantages:
- It's easy to revert, removing the "+disabled" suffix will re-activate
  the account.
- It's retrocompatible as it doesn't require a new field on the IAP
  account model.
- It's safer as the "disabled" information is directly part of the
  token, its logic is handled on the IAP side and thus common to all
  services.

In this new version, the tokens need to be transformed as follows:

 original token     | neutralized token
--------------------|-------------------
 abcd1234           | acbd1234+disabled
 my_token+suffix123 | my_token+disabled
 abc+disabled       | abc+disabled

closes odoo/odoo#138455

X-original-commit: 550595d84b9689f3fcc00f840e9d9d6d521c5ea9
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
2023-10-12 11:20:35 +00:00
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%