Define custom roles using a visual builder

Published: July 29, 2026

v2026-07-29

This is a paid feature

This feature is available on certain Enterprise plans. Talk to sales to learn more.

Content Resources define the set of documents a custom role grants access to. Now when defining a content resource, a visual builder will autogenerate the necessary GROQ filter based on your deployed schema.

Loading...

The visual builder takes you through three steps:

  • Set the name and description for this resource
  • Select which document types to match
  • Create filter conditions to match specific documents

When creating a filter, each condition can compare the value of different document fields. Select User attribute —> document field to build a filter that dynamically matches documents based on the attributes of users who get assigned this role.

Protip

Related documentation

Loading...
Define custom roles using a visual builder | Sanity Docs