-
Notifications
You must be signed in to change notification settings - Fork 147
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
Access control for shared suppliers #1033
Comments
Hey kidhab, |
Great idea. I thinkg @yksflip's remark is valid for many smaller suppliers. But for large suppliers, like wholesale retailers (e.g. Odin in NL), I don't think this will work: there are thousands of products, and no foodcoop includes all products (this would be too much work not useful for the foodcoop maintaining it, and Foodsoft doesn't handle this well or not at all). So I think we still need a way to pick and choose + sync products from an external supplier. There could be alternative approaches, e.g. talking directly to a wholesale retailer's website or API, and synchronising with that. |
Correct me if I'm wrong, but I thought this was about filtering what shared suppliers should be displayed and I think this might get obsolote with the new sharelist approach. @kidhab maybe we could have a discussion (together with @lentschi ?) on how to continue with the shared suppliers in foodsoft, as it seems to me that you've got some experience with it. |
(updated) there are certain areas (like order management, or upload with synchronise), but when just importing articles I think it would be doable. Given large enough timeouts on upload processing, one can upload huge files to replace supplier articles. Enable Delete articles not in uploaded file. and make sure Keep current units, recompute unit quantity and price is disabled. An alternative approach is to not only allow Foodsoft to synchronise with another Foodsoft instance, but also with supplier websites. I think this would be really nice for wholesale suppliers (and allow foodcoops to use their own login, possibly with prices and availability tailored to the relationship between Foodcoop and supplier) - but for later, after Foodsoft sync. |
Sure, I'd be up for a discussion about that. 👍 (I actually tried to reach you, @kidhab, through the forum, but probably I addressed the wrong account or something) |
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
The text was updated successfully, but these errors were encountered: