openfoodfoundation / wishlist

This repository welcomes ideas and suggestions to improve the OFN software.
3 stars 0 forks source link

[Admin][Permissions] Set 'sells = none/own/any' according to permissions automatically #302

Open drummer83 opened 1 year ago

drummer83 commented 1 year ago

What is the need / problem?

There is a discrepancy between the enterprise permissions, the setting of sells = none/own/any and the display of producers and places to buy a producer's products. This was observed first in #9589, partly solved in #9768 and documented and discussed in detail in #9793.

Which type of users does this problem affect (and how many, if known)?

Potential solutions that will solve the problem

It was proposed to implement the following behavior:

Automatic setting:

Things to consider (before implementing a solution)

Enterprise types: Producer? Sells Enterprise type
yes none producer profile
yes own producer shop
yes any producer hub
no none non-producer profile
no any non-producer hub

Connected wishlist and discovery discussions

#9589 #9768 #9793

Additional context

Sells setting (super admin only) - /admin/enterprises/ENTERPRISE/edit: image

Sells setting (enterprise user) - /admin/enterprises: image

Enterprise permissions - /admin/enterprise_relationships: image

Display of producers and places to buy a producer's product:

  1. Shop/hub modal (on page /map or when clicking on a producer in the shopfront) image
  2. Profile modal (on page /map or when clicking on a producer in the shopfront) image
  3. Our producers list (on page /shops) image
  4. Vendors list (on page /producers -> shop for x's products at shop xyz) image
  5. Producers list (in the shopfront of an enterprise) image
RachL commented 1 year ago

Not a papercut :(