menu

Saleor Commerce

The world’s fastest growing open-source e-commerce platform with billions of dollars transacted. Powered by Python, GraphQL, ReactJS and PWA.

Channels
# All channels
view-forward
# General
view-forward
# Announcements
view-forward
# Design
view-forward
# Development
view-forward
# Saleor Features
view-forward
Team

Per-product page permissions

May 11, 2020 at 5:40pm

Per-product page permissions

May 11, 2020 at 5:40pm
Hello, I am evaluating recommending Saleor to a client. Quick question - they need the ability to give certain people the ability to edit the details of some products and not others. Is this something that Saleor currently supports?

May 12, 2020 at 7:03am
Saleor is not able to give permissions only to part of the products. You can grant these permissions to your staff users: MANAGE_USERS, MANAGE_STAFF, MANAGE_SERVICE_ACCOUNTS, MANAGE_APPS, MANAGE_DISCOUNTS, MANAGE_PLUGINS, MANAGE_GIFT_CARD, MANAGE_MENUS, MANAGE_ORDERS, MANAGE_PAGES, MANAGE_PRODUCTS, MANAGE_SHIPPING, MANAGE_SETTINGS, MANAGE_TRANSLATIONS, MANAGE_WEBHOOKS, MANAGE_CHECKOUTS
  • reply
  • like
I would need something similar for my project how do you recommend to go about it ? Add a meta attribute on the products to hold permissions ?
  • reply
  • like

May 12, 2020 at 5:30pm
Hey there, would it be possible to share a use-case?
  • reply
  • like
Sure for a marketplace like e-commerce platform I'd like to have a dashboard per "vendor" with possibility to add and modify only their products and orders
  • reply
  • like
let me know if that sound too fuzzy I can provide a more precise example
  • reply
  • like
Hi I just want to thinking out loud, What if customer make one order with 2 items from different vendors?
  • reply
  • like
Aliexpress handle this case by create order for each vendor
  • reply
  • like
there are a lot to think about such as this issue , but for a poc I was focusing on getting the "products" per vendor capability first and simply handle orders centrally with mails to the corresponding vendor
  • reply
  • like
Good call
  • reply
  • like

May 13, 2020 at 5:56am
I don't think that this is possible without modifying Saleor core. I would make some experiments with changing resolvers and mutations to store somewhere the data about the owner of the elements. Queries will return only the data assigned to the given vendor. Each vendor would be able to use the permission system for its own staff users. As I said I don't know the whole details so I don't know if this proposition is the best one, also this approach requires changes in all "shared" queries and mutations which means that you need to modify Saleor core and updates to the newest version of Saleor will cost you a lot of time.
  • reply
  • like
thanks for the answer what do you think of putting an app in the middle (between the vendor and the core api). The app would check if a product has a meta attribute corresponding to a vendor ID and perform a mutation only if they match ? (to avoid modifying the core API)
  • reply
  • like