👋 Next.js Conf 2024: Come build, party, run, and connect with us! See all events

Preventing users from deleting a document in Sanity.io

2 replies
Last updated: Mar 2, 2024
hey, is there a way to prevent the user from deleting a document? (e.g. a singleton document configured at build time that should be left as is)
Feb 29, 2024, 8:33 PM
Yes, you can remove the action for that document in your config. Here’s how you replace an action. You can adjust it to instead filter out an action.
Feb 29, 2024, 9:35 PM
thanks!
Mar 2, 2024, 4:03 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?