Customer account extension
I have a custom model, that I want cusomters to only be able to view ones related to their id (record belongs to a s shopify customer), but the shop merchant/admin should be able to view all records beloning to their shop (every record also belongs to a shopifyShop).
What should the tenacy look like?
https://docs.gadget.dev/guides/plugins/shopify/customer-account-ui-extensions#adding-a-tenancy-filter
12 Replies
I think I need to create a filter for the role
shopify-storefront-customers
Yes
I would recommend looking st the base tenacy filters that are written for shopify models then try to copy that one
Perfect!
On the dev env it worked fine, and on the live it didn't

Are you pointing to the correct env in the client instantiation?
aha!
Thats an import, not a new instance of the Client
thisis a customer account extension
how do I choose the env
this is how im initiaitn the client
The ai chat gave me this
None of those options will work. You'll just need to remember to switch the env when going live
Extensions are sandboxed and don't even allow you to know when you're in dev or not
so jus tthis?
const api = new Client({
environment: "production",
});
Yep