Per-product page permissionsMay 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
May 12, 2020 at 5:30pm
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
let me know if that sound too fuzzy I can provide a more precise example
Aliexpress handle this case by create order for each vendor
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
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.
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)