openfoodfacts-server
openfoodfacts-server copied to clipboard
Prevention - New edit rules to ignore or notify edits that match given conditions
What
We need a new system to easily add rules that can be triggered when products are edited and when the edits match given conditions.
In particular this is needed to ignore unwanted edits from apps.
Proposed features and format:
@edit_rules = (
{
name => "App XYZ",
conditions => [
user_id => "xyz",
],
actions => {
ignore_if_existing_ingredients_texts_fr => 1,
ignore_if_0_nutriments_fruits-vegetables-nuts_100g => 1,
warn_if_match_nutriments_fruits-vegetables-nuts_100g => 100,
ignore_if_regexp_match_packaging => "^(artikel|produit|producto|produkt|produkte)$",
},
notifications => qw (
[email protected]
slack_channel_edit-alert
slack_channel_edit-alert-xyz
),
},
);
Part of
- #5538
Can we close ?