Structured Content 2022: Join our conference to explore fresh perspectives on content and digital experiences →

When to add "history" as a permission in Sanity access controls

3 replies
Last updated: Feb 7, 2021

Hi there, I have a small bug I can’t resolve. I have Access Control grants implemented and I give permissions based on doc types.

"filter": "_type == 'post'",
      "permissions": ["read", "update", "create"]
But except ‘administrator’, my permission managed users can’t see documents History. It might be something with my code, but I thought to check if there’s another workaround or special permission I need to enable.

includeMendozaPatches requires history access on document

Feb 7, 2021, 12:30 PM

Add

history
to the permissions:
    "permissions": ["read", "update", "create", "history"]

Feb 7, 2021, 12:31 PM

Add

history
to the permissions:
    "permissions": ["read", "update", "create", "history"]

Feb 7, 2021, 12:31 PM

thank you, this worked.

Feb 7, 2021, 2:16 PM

Sanity.io: Get the most out of your content

Sanity.io is a platform to build websites and applications. It comes with great APIs that let you treat content like data. Give your team exactly what they need to edit and publish their content with the customizable Sanity Studio. Get real-time collaboration out of the box. Sanity.io comes with a hosted datastore for JSON documents, query languages like GROQ and GraphQL, CDNs, on-demand asset transformations, presentation agnostic rich text, plugins, and much more.

Don't compromise on developer experience. Join thousands of developers and trusted companies and power your content with Sanity.io. Free to get started, pay-as-you-go on all plans.