-
Notifications
You must be signed in to change notification settings - Fork 149
Description
Sharedlists provides a database of suppliers and their articles. The Foodsoft can connect to this database and automaticalle import/ update a suppliers articles from the Sharedlists database.
Currently all available suppliers from Sharedlists will be shown at the Foodsoft instance. That is not ideal in case of a multicoop Foodsoft setup (running multiple Foodsoft instances from the same codebase and configuration):
There are suppliers that are only usefull for a single foodcoop or suppliers with different price models per foodcoop (e.g. depending on the distance of the delivery).
It would be nice to have some kind of access control for shared suppliers with the aim that a foodcoop only sees suppliers that are enabled for them.
What would the best way to implement this?
As far as I can see this are the most relevant parts from the Foodsoft and Sharedlists:
https://github.com/foodcoops/foodsoft/blob/master/app/views/suppliers/shared_suppliers.html.haml
https://github.com/foodcoops/foodsoft/blob/master/app/controllers/suppliers_controller.rb#L62
https://github.com/foodcoops/foodsoft/blob/master/app/models/shared_supplier.rb
https://github.com/foodcoops/sharedlists/blob/main/db/schema.rb#L35