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

Use Open Food Facts API to understand if a user is a moderator #75

Closed
alexgarel opened this issue Aug 19, 2024 · 0 comments
Closed

Use Open Food Facts API to understand if a user is a moderator #75

alexgarel opened this issue Aug 19, 2024 · 0 comments
Labels
⭐ top issue Top issue.

Comments

@alexgarel
Copy link
Member

What

Right now someone which is moderator on open food facts, does not have access to nutripatrol.

(see report from Teleperion87 on slack)

Expected behavior

Every moderators of Open Food Facts (users with the property "moderator" checked)

image

should be able to access nutri patrol.

More info

Currently we use a static file const/moderators.ts, we should instead use openfoodfacts API to get this information.

Open Food Facts now returns this info in a JSON in auth.pl, using body=1 parameter: https://world.openfoodfacts.org/cgi/auth.pl?body=1

Eg:

{
  "status": 1,
  "status_verbose": "user signed-in",
  "user": {
    "admin": 0,
    "moderator": 1,
    "name": "TEST"
  },
  "user_id": "test-test"
}
@alexgarel alexgarel added the 🐛 bug Something isn't working label Aug 19, 2024
@github-actions github-actions bot added the ⭐ top issue Top issue. label Aug 19, 2024
@teolemon teolemon removed the 🐛 bug Something isn't working label Oct 19, 2024
@Valimp Valimp closed this as completed Oct 28, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in 🛡️ Nutri-Patrol Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐ top issue Top issue.
Projects
Archived in project
Development

No branches or pull requests

3 participants