Howto check if current visitor is shop's admin?

后端 未结 6 1044
小蘑菇
小蘑菇 2020-12-19 07:07

I would like to create a product that would be available in Shopify\'s storefront but would only be accessible for the shop administrator. Is there anyway to identify if the

6条回答
  •  佛祖请我去吃肉
    2020-12-19 07:32

    Currently there isn't. You could perhaps try inspecting cookies and stuff to see if there's some identifying information that would let you know if the user is an admin, but it would be fragile.

    This would also require rendering the items, but hiding them via CSS. Then you'd show them using JS after you've run your checks.

    As stated, this would probably be really fragile.

提交回复
热议问题