Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify and protect images and data sent by producers #2086

Closed
Tracked by #5521
stephanegigandet opened this issue Jul 12, 2019 · 3 comments · Fixed by #8610
Closed
Tracked by #5521

Identify and protect images and data sent by producers #2086

stephanegigandet opened this issue Jul 12, 2019 · 3 comments · Fixed by #8610
Assignees
Labels
Data import ✨ Feature Features or enhancements to Open Food Facts server 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers

Comments

@stephanegigandet
Copy link
Contributor

stephanegigandet commented Jul 12, 2019

This is to be done in combination with #2085

We currently have a rather crude approach that blocks edits from the API (apps, robotoff etc.) when product data has been imported. The new approach will specifically mark which fields have been sent by the producer.

  1. use the product edit history to create a new producer_provided_fields array with the list of fields added/changed by the manufacturer.
  • when the fields were changed by import_csv_file.pl
  • or when the fields were changed by a user that is marked as a producer who sends us complete data
  1. allow only specific expert users to change those fields

Tag fields like labels etc. can still be added to, and images can still be added (not not selected if an existing image is present).

Part of

@stephanegigandet stephanegigandet added ✨ Feature Features or enhancements to Open Food Facts server Data import labels Jul 12, 2019
@stephanegigandet stephanegigandet self-assigned this Jul 12, 2019
@teolemon teolemon added the 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers label Jan 27, 2020
@teolemon
Copy link
Member

teolemon commented Feb 6, 2020

lgtm

@stephanegigandet
Copy link
Contributor Author

Also see #8282

We already have a mechanism in place to protect data sent by producers. See #8274

I think we are missing the protection for images selected by producers and coming from the pro platform.

Suggested approach:

  1. Test on a dev environment if images sent and selected from the pro platform are protected from changes from normal users on the public platform
  2. Add integration tests for selecting images, with some of them on protected images (similar tests to those added in fix: refactor protection of data imported from producers #8274 )
  3. Add protection for images for normal users

@stephanegigandet
Copy link
Contributor Author

Precision: protecting images means that users should not be able to select a new image (for product front photo, or ingredients, or nutrition, in a specific language), if there is already a photo selected by the producer.

Users are still able to upload new images (but they won't be selected and shown).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Data import ✨ Feature Features or enhancements to Open Food Facts server 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants