Sanity Library Reference Docs
    Preparing search index...

    Interface BlueprintPermissionConfigBeta

    Configuration for a custom permission resource. This feature is subject to breaking changes.

    interface BlueprintPermissionConfig {
        config: { filter: string };
        description?: string;
        name: string;
        permissionType: BlueprintPermissionType;
        project?: string;
        title?: string;
    }
    Index

    Properties

    config: { filter: string }

    The configuration of the permission.

    Type declaration

    • filter: string

      A GROQ filter that selects the documents that the permission applies to, e.g. _type == "article".

    description?: string

    A description of the permission. Defaults to an empty string.

    name: string

    The name of the permission.

    Lowercase letters, numbers, hyphens, and underscores only. Must not start with sanity or res-.

    permissionType: BlueprintPermissionType

    The type of the permission. It cannot change after the permission is created.

    Manage creates content resources as sanity.document.filter.mode, and lists only custom permissions of that type.

    project?: string

    The project ID of the project that contains the permission.

    The project attribute must be defined if your blueprint is scoped to an organization and the stack has no default project.

    title?: string

    A human-readable title. Defaults to name.