[{"data":1,"prerenderedAt":1970},["ShallowReactive",2],{"navigation_docs":3,"-docs-core-users-and-access-access-control":478,"-docs-core-users-and-access-access-control-surround":1965},[4,352,446],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Docs",false,"\u002Fdocs\u002Fcore","docs\u002F1.core",[10,35,141,174,195,212,242,318],{"title":11,"icon":6,"path":12,"stem":13,"children":14,"page":6},"Getting Started","\u002Fdocs\u002Fcore\u002Fgetting-started","docs\u002F1.core\u002F1.getting-started",[15,19,23,27,31],{"title":16,"path":17,"stem":18},"Introduction","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fintroduction","docs\u002F1.core\u002F1.getting-started\u002F1.introduction",{"title":20,"path":21,"stem":22},"Quick Start","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fquick-start","docs\u002F1.core\u002F1.getting-started\u002F2.quick-start",{"title":24,"path":25,"stem":26},"Add to an Existing Site","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fexisting-site","docs\u002F1.core\u002F1.getting-started\u002F3.existing-site",{"title":28,"path":29,"stem":30},"Configuration","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fconfiguration","docs\u002F1.core\u002F1.getting-started\u002F4.configuration",{"title":32,"path":33,"stem":34},"How Tenon works","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fhow-tenon-works","docs\u002F1.core\u002F1.getting-started\u002F5.how-tenon-works",{"title":36,"icon":6,"path":37,"stem":38,"children":39,"page":6},"Content Modeling","\u002Fdocs\u002Fcore\u002Fcontent-modeling","docs\u002F1.core\u002F2.content-modeling",[40,44,111,115,119],{"title":41,"path":42,"stem":43},"Collections and Globals","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fcollections-and-globals","docs\u002F1.core\u002F2.content-modeling\u002F1.collections-and-globals",{"title":45,"icon":6,"path":46,"stem":47,"children":48},"Fields","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002Findex",[49,51,55,59,63,67,71,75,79,83,87,91,95,99,103,107],{"title":50,"path":46,"stem":47},"Overview",{"title":52,"path":53,"stem":54},"Array","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Farray","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F01.array",{"title":56,"path":57,"stem":58},"Blocks","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fblocks","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F02.blocks",{"title":60,"path":61,"stem":62},"Boolean","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fboolean","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F03.boolean",{"title":64,"path":65,"stem":66},"Date","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fdate","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F04.date",{"title":68,"path":69,"stem":70},"File","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Ffile","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F05.file",{"title":72,"path":73,"stem":74},"Group","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fgroup","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F06.group",{"title":76,"path":77,"stem":78},"Image","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fimage","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F07.image",{"title":80,"path":81,"stem":82},"Link","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Flink","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F08.link",{"title":84,"path":85,"stem":86},"Number","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fnumber","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F09.number",{"title":88,"path":89,"stem":90},"Relation","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Frelation","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F10.relation",{"title":92,"path":93,"stem":94},"Rich text","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Frich-text","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F11.rich-text",{"title":96,"path":97,"stem":98},"Select","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fselect","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F12.select",{"title":100,"path":101,"stem":102},"Size","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fsize","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F13.size",{"title":104,"path":105,"stem":106},"Slug","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fslug","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F14.slug",{"title":108,"path":109,"stem":110},"Text","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Ftext","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F15.text",{"title":112,"path":113,"stem":114},"Relations","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Frelations","docs\u002F1.core\u002F2.content-modeling\u002F3.relations",{"title":116,"path":117,"stem":118},"Media","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fmedia","docs\u002F1.core\u002F2.content-modeling\u002F4.media",{"title":120,"icon":6,"path":121,"stem":122,"children":123},"Presets","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002Findex",[124,125,129,133,137],{"title":50,"path":121,"stem":122},{"title":126,"path":127,"stem":128},"Menu","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets\u002Fmenu","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002F1.menu",{"title":130,"path":131,"stem":132},"Pages","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets\u002Fpages","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002F2.pages",{"title":134,"path":135,"stem":136},"Settings","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets\u002Fsettings","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002F3.settings",{"title":138,"path":139,"stem":140},"Strings","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets\u002Fstrings","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002F4.strings",{"title":142,"icon":6,"path":143,"stem":144,"children":145,"page":6},"Working with Content","\u002Fdocs\u002Fcore\u002Fworking-with-content","docs\u002F1.core\u002F3.working-with-content",[146,150,154,158,162,166,170],{"title":147,"path":148,"stem":149},"Reading","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Freading","docs\u002F1.core\u002F3.working-with-content\u002F1.reading",{"title":151,"path":152,"stem":153},"Writing and Drafts","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fwriting","docs\u002F1.core\u002F3.working-with-content\u002F2.writing",{"title":155,"path":156,"stem":157},"Scheduled publishing","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fscheduled-publishing","docs\u002F1.core\u002F3.working-with-content\u002F3.scheduled-publishing",{"title":159,"path":160,"stem":161},"HTTP API and Client","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fhttp-api-and-client","docs\u002F1.core\u002F3.working-with-content\u002F4.http-api-and-client",{"title":163,"path":164,"stem":165},"Headless","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fheadless","docs\u002F1.core\u002F3.working-with-content\u002F5.headless",{"title":167,"path":168,"stem":169},"Localization","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Flocalization","docs\u002F1.core\u002F3.working-with-content\u002F6.localization",{"title":171,"path":172,"stem":173},"Hooks","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fhooks","docs\u002F1.core\u002F3.working-with-content\u002F7.hooks",{"title":175,"icon":6,"path":176,"stem":177,"children":178,"page":6},"Building Your Site","\u002Fdocs\u002Fcore\u002Fbuilding-your-site","docs\u002F1.core\u002F4.building-your-site",[179,183,187,191],{"title":180,"path":181,"stem":182},"Pages and SEO","\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Fpages-and-seo","docs\u002F1.core\u002F4.building-your-site\u002F1.pages-and-seo",{"title":184,"path":185,"stem":186},"Components","\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Fcomponents","docs\u002F1.core\u002F4.building-your-site\u002F2.components",{"title":188,"path":189,"stem":190},"Menus","\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Fmenus","docs\u002F1.core\u002F4.building-your-site\u002F3.menus",{"title":192,"path":193,"stem":194},"Live Preview","\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Flive-preview","docs\u002F1.core\u002F4.building-your-site\u002F4.live-preview",{"title":196,"icon":6,"path":197,"stem":198,"children":199,"page":6},"Users and Access","\u002Fdocs\u002Fcore\u002Fusers-and-access","docs\u002F1.core\u002F5.users-and-access",[200,204,208],{"title":201,"path":202,"stem":203},"Authentication","\u002Fdocs\u002Fcore\u002Fusers-and-access\u002Fauthentication","docs\u002F1.core\u002F5.users-and-access\u002F1.authentication",{"title":205,"path":206,"stem":207},"Access Control","\u002Fdocs\u002Fcore\u002Fusers-and-access\u002Faccess-control","docs\u002F1.core\u002F5.users-and-access\u002F2.access-control",{"title":209,"path":210,"stem":211},"API Keys","\u002Fdocs\u002Fcore\u002Fusers-and-access\u002Fapi-keys","docs\u002F1.core\u002F5.users-and-access\u002F3.api-keys",{"title":213,"icon":6,"path":214,"stem":215,"children":216},"Customization","\u002Fdocs\u002Fcore\u002Fcustomization","docs\u002F1.core\u002F6.customization\u002Findex",[217,218,222,226,230,234,238],{"title":50,"path":214,"stem":215},{"title":219,"path":220,"stem":221},"Admin","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fadmin","docs\u002F1.core\u002F6.customization\u002F1.admin",{"title":223,"path":224,"stem":225},"Custom Fields","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fcustom-fields","docs\u002F1.core\u002F6.customization\u002F2.custom-fields",{"title":227,"path":228,"stem":229},"Custom Pages and Actions","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fcustom-pages-and-actions","docs\u002F1.core\u002F6.customization\u002F3.custom-pages-and-actions",{"title":231,"path":232,"stem":233},"Styles and UI Libraries","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fstyles-and-ui-libraries","docs\u002F1.core\u002F6.customization\u002F4.styles-and-ui-libraries",{"title":235,"path":236,"stem":237},"Rich Text Extensions","\u002Fdocs\u002Fcore\u002Fcustomization\u002Frich-text-extensions","docs\u002F1.core\u002F6.customization\u002F5.rich-text-extensions",{"title":239,"path":240,"stem":241},"Plugins","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fplugins","docs\u002F1.core\u002F6.customization\u002F6.plugins",{"title":243,"icon":6,"path":244,"stem":245,"children":246},"Operations","\u002Fdocs\u002Fcore\u002Foperations","docs\u002F1.core\u002F7.operations\u002Findex",[247,248,266,288,306,310,314],{"title":50,"path":244,"stem":245},{"title":249,"icon":6,"path":250,"stem":251,"children":252},"Email","\u002Fdocs\u002Fcore\u002Foperations\u002Femail","docs\u002F1.core\u002F7.operations\u002F1.email\u002Findex",[253,254,258,262],{"title":50,"path":250,"stem":251},{"title":255,"path":256,"stem":257},"SMTP","\u002Fdocs\u002Fcore\u002Foperations\u002Femail\u002Fsmtp","docs\u002F1.core\u002F7.operations\u002F1.email\u002F1.smtp",{"title":259,"path":260,"stem":261},"Cloudflare","\u002Fdocs\u002Fcore\u002Foperations\u002Femail\u002Fcloudflare","docs\u002F1.core\u002F7.operations\u002F1.email\u002F2.cloudflare",{"title":263,"path":264,"stem":265},"Custom adapter","\u002Fdocs\u002Fcore\u002Foperations\u002Femail\u002Fcustom-adapter","docs\u002F1.core\u002F7.operations\u002F1.email\u002F3.custom-adapter",{"title":267,"icon":6,"path":268,"stem":269,"children":270},"Jobs","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002Findex",[271,272,276,280,284],{"title":50,"path":268,"stem":269},{"title":273,"path":274,"stem":275},"Queue jobs","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs\u002Fqueue-jobs","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002F1.queue-jobs",{"title":277,"path":278,"stem":279},"Recurring jobs","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs\u002Frecurring-jobs","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002F2.recurring-jobs",{"title":281,"path":282,"stem":283},"The clock","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs\u002Fclock","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002F3.clock",{"title":285,"path":286,"stem":287},"Manage jobs","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs\u002Fmanage-jobs","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002F4.manage-jobs",{"title":289,"icon":6,"path":290,"stem":291,"children":292},"Webhooks","\u002Fdocs\u002Fcore\u002Foperations\u002Fwebhooks","docs\u002F1.core\u002F7.operations\u002F3.webhooks\u002Findex",[293,294,298,302],{"title":50,"path":290,"stem":291},{"title":295,"path":296,"stem":297},"Send webhooks","\u002Fdocs\u002Fcore\u002Foperations\u002Fwebhooks\u002Fsend-webhooks","docs\u002F1.core\u002F7.operations\u002F3.webhooks\u002F1.send-webhooks",{"title":299,"path":300,"stem":301},"Receive webhooks","\u002Fdocs\u002Fcore\u002Foperations\u002Fwebhooks\u002Freceive-webhooks","docs\u002F1.core\u002F7.operations\u002F3.webhooks\u002F2.receive-webhooks",{"title":303,"path":304,"stem":305},"Rebuild on publish","\u002Fdocs\u002Fcore\u002Foperations\u002Fwebhooks\u002Frebuild-on-publish","docs\u002F1.core\u002F7.operations\u002F3.webhooks\u002F3.rebuild-on-publish",{"title":307,"path":308,"stem":309},"Backup and Restore","\u002Fdocs\u002Fcore\u002Foperations\u002Fbackup-and-restore","docs\u002F1.core\u002F7.operations\u002F4.backup-and-restore",{"title":311,"path":312,"stem":313},"Lifecycle Hooks","\u002Fdocs\u002Fcore\u002Foperations\u002Flifecycle-hooks","docs\u002F1.core\u002F7.operations\u002F5.lifecycle-hooks",{"title":315,"path":316,"stem":317},"Upgrades and Schema Changes","\u002Fdocs\u002Fcore\u002Foperations\u002Fupgrades-and-schema-changes","docs\u002F1.core\u002F7.operations\u002F6.upgrades-and-schema-changes",{"title":319,"icon":6,"path":320,"stem":321,"children":322,"page":6},"Reference","\u002Fdocs\u002Fcore\u002Freference","docs\u002F1.core\u002F8.reference",[323,326,344,348],{"title":28,"path":324,"stem":325},"\u002Fdocs\u002Fcore\u002Freference\u002Fconfiguration","docs\u002F1.core\u002F8.reference\u002F1.configuration",{"title":327,"icon":6,"path":328,"stem":329,"children":330},"API","\u002Fdocs\u002Fcore\u002Freference\u002Fapi","docs\u002F1.core\u002F8.reference\u002F2.api\u002Findex",[331,332,336,340],{"title":50,"path":328,"stem":329},{"title":333,"path":334,"stem":335},"Local API","\u002Fdocs\u002Fcore\u002Freference\u002Fapi\u002Flocal-api","docs\u002F1.core\u002F8.reference\u002F2.api\u002F1.local-api",{"title":337,"path":338,"stem":339},"Client","\u002Fdocs\u002Fcore\u002Freference\u002Fapi\u002Fclient","docs\u002F1.core\u002F8.reference\u002F2.api\u002F2.client",{"title":341,"path":342,"stem":343},"HTTP routes","\u002Fdocs\u002Fcore\u002Freference\u002Fapi\u002Fhttp-routes","docs\u002F1.core\u002F8.reference\u002F2.api\u002F3.http-routes",{"title":345,"path":346,"stem":347},"Errors and types","\u002Fdocs\u002Fcore\u002Freference\u002Ferrors-and-types","docs\u002F1.core\u002F8.reference\u002F3.errors-and-types",{"title":349,"path":350,"stem":351},"Package exports","\u002Fdocs\u002Fcore\u002Freference\u002Fpackage-exports","docs\u002F1.core\u002F8.reference\u002F4.package-exports",{"title":353,"icon":6,"path":354,"stem":355,"children":356,"page":6},"Guide","\u002Fdocs\u002Fguide","docs\u002F2.guide",[357,383,400,417],{"title":358,"icon":6,"path":359,"stem":360,"children":361},"Frameworks","\u002Fdocs\u002Fguide\u002Fframeworks","docs\u002F2.guide\u002F1.frameworks\u002Findex",[362,363,367,371,375,379],{"title":50,"path":359,"stem":360},{"title":364,"path":365,"stem":366},"Astro","\u002Fdocs\u002Fguide\u002Fframeworks\u002Fastro","docs\u002F2.guide\u002F1.frameworks\u002F1.astro",{"title":368,"path":369,"stem":370},"Nuxt","\u002Fdocs\u002Fguide\u002Fframeworks\u002Fnuxt","docs\u002F2.guide\u002F1.frameworks\u002F2.nuxt",{"title":372,"path":373,"stem":374},"TanStack Start","\u002Fdocs\u002Fguide\u002Fframeworks\u002Ftanstack-start","docs\u002F2.guide\u002F1.frameworks\u002F3.tanstack-start",{"title":376,"path":377,"stem":378},"Standalone","\u002Fdocs\u002Fguide\u002Fframeworks\u002Fstandalone","docs\u002F2.guide\u002F1.frameworks\u002F4.standalone",{"title":380,"path":381,"stem":382},"Other Frameworks","\u002Fdocs\u002Fguide\u002Fframeworks\u002Fother-frameworks","docs\u002F2.guide\u002F1.frameworks\u002F5.other-frameworks",{"title":384,"icon":6,"path":385,"stem":386,"children":387},"Deployment","\u002Fdocs\u002Fguide\u002Fdeployment","docs\u002F2.guide\u002F2.deployment\u002Findex",[388,389,393,397],{"title":50,"path":385,"stem":386},{"title":390,"path":391,"stem":392},"Node","\u002Fdocs\u002Fguide\u002Fdeployment\u002Fnode","docs\u002F2.guide\u002F2.deployment\u002F1.node",{"title":394,"path":395,"stem":396},"Vercel","\u002Fdocs\u002Fguide\u002Fdeployment\u002Fvercel","docs\u002F2.guide\u002F2.deployment\u002F2.vercel",{"title":259,"path":398,"stem":399},"\u002Fdocs\u002Fguide\u002Fdeployment\u002Fcloudflare","docs\u002F2.guide\u002F2.deployment\u002F3.cloudflare",{"title":401,"icon":6,"path":402,"stem":403,"children":404,"page":6},"Databases and Storage","\u002Fdocs\u002Fguide\u002Fdatabases-and-storage","docs\u002F2.guide\u002F3.databases-and-storage",[405,409,413],{"title":406,"path":407,"stem":408},"Databases","\u002Fdocs\u002Fguide\u002Fdatabases-and-storage\u002Fdatabases","docs\u002F2.guide\u002F3.databases-and-storage\u002F1.databases",{"title":410,"path":411,"stem":412},"Media Storage","\u002Fdocs\u002Fguide\u002Fdatabases-and-storage\u002Fmedia-storage","docs\u002F2.guide\u002F3.databases-and-storage\u002F2.media-storage",{"title":414,"path":415,"stem":416},"Image Providers","\u002Fdocs\u002Fguide\u002Fdatabases-and-storage\u002Fimage-providers","docs\u002F2.guide\u002F3.databases-and-storage\u002F3.image-providers",{"title":418,"icon":6,"path":419,"stem":420,"children":421,"page":6},"Recipes","\u002Fdocs\u002Fguide\u002Frecipes","docs\u002F2.guide\u002F4.recipes",[422,426,430,434,438,442],{"title":423,"path":424,"stem":425},"Seed Content","\u002Fdocs\u002Fguide\u002Frecipes\u002Fseed-content","docs\u002F2.guide\u002F4.recipes\u002F1.seed-content",{"title":427,"path":428,"stem":429},"Tracking and Consent","\u002Fdocs\u002Fguide\u002Frecipes\u002Ftracking-and-consent","docs\u002F2.guide\u002F4.recipes\u002F2.tracking-and-consent",{"title":431,"path":432,"stem":433},"Build a Custom Field","\u002Fdocs\u002Fguide\u002Frecipes\u002Fbuild-a-custom-field","docs\u002F2.guide\u002F4.recipes\u002F3.build-a-custom-field",{"title":435,"path":436,"stem":437},"Write a Plugin","\u002Fdocs\u002Fguide\u002Frecipes\u002Fwrite-a-plugin","docs\u002F2.guide\u002F4.recipes\u002F4.write-a-plugin",{"title":439,"path":440,"stem":441},"Build a Headless Site with Next.js","\u002Fdocs\u002Fguide\u002Frecipes\u002Fbuild-a-headless-site-with-nextjs","docs\u002F2.guide\u002F4.recipes\u002F5.build-a-headless-site-with-nextjs",{"title":443,"path":444,"stem":445},"Troubleshooting","\u002Fdocs\u002Fguide\u002Frecipes\u002Ftroubleshooting","docs\u002F2.guide\u002F4.recipes\u002F6.troubleshooting",{"title":447,"icon":6,"path":448,"stem":449,"children":450,"page":6},"CLI","\u002Fdocs\u002Fcli","docs\u002F3.cli",[451,454,458,462,466,470,474],{"title":50,"path":452,"stem":453},"\u002Fdocs\u002Fcli\u002Foverview","docs\u002F3.cli\u002F1.overview",{"title":455,"path":456,"stem":457},"create-tenoncms","\u002Fdocs\u002Fcli\u002Fcreate-tenoncms","docs\u002F3.cli\u002F2.create-tenoncms",{"title":459,"path":460,"stem":461},"tenon backup","\u002Fdocs\u002Fcli\u002Fbackup","docs\u002F3.cli\u002F3.backup",{"title":463,"path":464,"stem":465},"tenon users","\u002Fdocs\u002Fcli\u002Fusers","docs\u002F3.cli\u002F4.users",{"title":467,"path":468,"stem":469},"tenon media","\u002Fdocs\u002Fcli\u002Fmedia","docs\u002F3.cli\u002F5.media",{"title":471,"path":472,"stem":473},"tenon upgrade","\u002Fdocs\u002Fcli\u002Fupgrade","docs\u002F3.cli\u002F6.upgrade",{"title":475,"path":476,"stem":477},"tenon login","\u002Fdocs\u002Fcli\u002Flogin","docs\u002F3.cli\u002F7.login",{"id":479,"title":205,"body":480,"description":1958,"extension":1959,"links":1960,"meta":1961,"navigation":1962,"path":206,"seo":1963,"stem":207,"__hash__":1964},"docs\u002Fdocs\u002F1.core\u002F5.users-and-access\u002F2.access-control.md",{"type":481,"value":482,"toc":1944},"minimark",[483,492,497,500,541,567,574,712,731,736,747,761,773,787,791,797,814,817,820,826,1056,1059,1112,1117,1188,1198,1202,1213,1225,1229,1238,1310,1313,1439,1448,1452,1455,1534,1537,1568,1574,1643,1652,1656,1673,1676,1869,1894,1897,1908,1912,1940],[484,485,486,487,491],"p",{},"Access control decides who may read and change what. Each user has a role, and rules on collections, globals, media and fields check that role. The server checks the rules everywhere: in the admin, on your site and in the HTTP API. Scripts and other services use ",[488,489,490],"a",{"href":210},"API keys"," instead of a user.",[493,494,496],"h2",{"id":495},"users-and-roles","Users and roles",[484,498,499],{},"Every user has one role. Two roles are built in:",[501,502,503,516],"table",{},[504,505,506],"thead",{},[507,508,509,513],"tr",{},[510,511,512],"th",{},"Role",[510,514,515],{},"Can",[517,518,519,531],"tbody",{},[507,520,521,528],{},[522,523,524],"td",{},[525,526,527],"code",{},"admin",[522,529,530],{},"Edit content and manage users",[507,532,533,538],{},[522,534,535],{},[525,536,537],{},"editor",[522,539,540],{},"Edit content",[542,543,544,548,559],"ul",{},[545,546,547],"li",{},"The first user is an admin. Later users are editors, unless an admin picks another role.",[545,549,550,551,555,556,558],{},"Only admins see ",[552,553,554],"strong",{},"Users"," and ",[552,557,490],{}," in the admin.",[545,560,561,562,566],{},"Your ",[488,563,565],{"href":564},"#rules","rules"," can limit what each role does with content.",[484,568,569,570,573],{},"Add your own roles in ",[525,571,572],{},"roles",". The label shows where an admin picks the role:",[575,576,582],"pre",{"className":577,"code":578,"filename":579,"language":580,"meta":581,"style":581},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","export default defineCms({\n  \u002F\u002F ...\n  roles: {\n    author: { label: { en: \"Author\", de: \"Autor\" }, description: \"Writes posts\" },\n  },\n});\n","tenon.config.ts","ts","",[525,583,584,608,615,628,694,700],{"__ignoreMap":581},[585,586,589,593,596,600,604],"span",{"class":587,"line":588},"line",1,[585,590,592],{"class":591},"s7zQu","export",[585,594,595],{"class":591}," default",[585,597,599],{"class":598},"s2Zo4"," defineCms",[585,601,603],{"class":602},"sTEyZ","(",[585,605,607],{"class":606},"sMK4o","{\n",[585,609,611],{"class":587,"line":610},2,[585,612,614],{"class":613},"sHwdD","  \u002F\u002F ...\n",[585,616,618,622,625],{"class":587,"line":617},3,[585,619,621],{"class":620},"swJcz","  roles",[585,623,624],{"class":606},":",[585,626,627],{"class":606}," {\n",[585,629,631,634,636,639,642,644,646,649,651,654,658,661,664,667,669,671,674,676,679,682,684,686,689,691],{"class":587,"line":630},4,[585,632,633],{"class":620},"    author",[585,635,624],{"class":606},[585,637,638],{"class":606}," {",[585,640,641],{"class":620}," label",[585,643,624],{"class":606},[585,645,638],{"class":606},[585,647,648],{"class":620}," en",[585,650,624],{"class":606},[585,652,653],{"class":606}," \"",[585,655,657],{"class":656},"sfazB","Author",[585,659,660],{"class":606},"\"",[585,662,663],{"class":606},",",[585,665,666],{"class":620}," de",[585,668,624],{"class":606},[585,670,653],{"class":606},[585,672,673],{"class":656},"Autor",[585,675,660],{"class":606},[585,677,678],{"class":606}," },",[585,680,681],{"class":620}," description",[585,683,624],{"class":606},[585,685,653],{"class":606},[585,687,688],{"class":656},"Writes posts",[585,690,660],{"class":606},[585,692,693],{"class":606}," },\n",[585,695,697],{"class":587,"line":696},5,[585,698,699],{"class":606},"  },\n",[585,701,703,706,709],{"class":587,"line":702},6,[585,704,705],{"class":606},"}",[585,707,708],{"class":602},")",[585,710,711],{"class":606},";\n",[484,713,714,715,718,719,555,722,725,726,555,728,730],{},"A role name MUST use only ",[525,716,717],{},"a-z",", ",[525,720,721],{},"0-9",[525,723,724],{},"-",". ",[525,727,527],{},[525,729,537],{}," are built in, so do not list them.",[732,733,735],"h3",{"id":734},"add-users","Add users",[484,737,738,739,742,743,746],{},"Admins add users under ",[552,740,741],{},"Manage → Users",". The ",[552,744,745],{},"+"," button has two options:",[542,748,749,755],{},[545,750,751,754],{},[552,752,753],{},"Invite"," asks for an email and a role. The person gets a link by email. Without email, the admin shows the link to copy and send yourself.",[545,756,757,760],{},[552,758,759],{},"Set password"," creates the user right away, with a name, a password and a role. Pass the password on yourself.",[484,762,763,764,768,769,772],{},"The invite link opens a page where the person picks a name and a password, or another ",[488,765,767],{"href":766},"\u002Fdocs\u002Fcore\u002Fusers-and-access\u002Fauthentication#sign-in-methods","sign-in method",". A link works once and expires after 7 days. ",[552,770,771],{},"Resend"," makes a new link and stops the old one.",[484,774,775,776,779,780,783,784,786],{},"From the command line, ",[525,777,778],{},"npx tenon users create \u003Cemail>"," sends an invite, and ",[525,781,782],{},"--password"," creates the user right away. See ",[488,785,463],{"href":464},".",[732,788,790],{"id":789},"manage-users","Manage users",[484,792,793,794,796],{},"A click on a user in ",[552,795,554],{}," opens it. An admin can:",[542,798,799,802,805,808,811],{},[545,800,801],{},"change the role",[545,803,804],{},"send a password reset",[545,806,807],{},"sign the user out on every device",[545,809,810],{},"deactivate the user. They cannot sign in until an admin reactivates them.",[545,812,813],{},"remove the user. Their content stays.",[484,815,816],{},"The last active admin cannot lose the admin role or be removed.",[493,818,819],{"id":565},"Rules",[484,821,822,825],{},[525,823,824],{},"access"," sets who may do what. Each key is an operation, and each value is a rule:",[575,827,830],{"className":577,"code":828,"filename":829,"language":580,"meta":581,"style":581},"export const posts = defineCollection({\n  access: {\n    create: [\"admin\", \"editor\", \"author\"],\n    delete: [\"admin\", \"editor\"],\n  },\n  fields: {\n    title: { type: \"text\", required: true },\n    note: { type: \"text\", access: { read: [\"admin\"], update: [\"admin\"] } },\n  },\n});\n","cms\u002Fcollections\u002Fposts.ts",[525,831,832,853,862,901,928,932,941,976,1042,1047],{"__ignoreMap":581},[585,833,834,836,840,843,846,849,851],{"class":587,"line":588},[585,835,592],{"class":591},[585,837,839],{"class":838},"spNyl"," const",[585,841,842],{"class":602}," posts ",[585,844,845],{"class":606},"=",[585,847,848],{"class":598}," defineCollection",[585,850,603],{"class":602},[585,852,607],{"class":606},[585,854,855,858,860],{"class":587,"line":610},[585,856,857],{"class":620},"  access",[585,859,624],{"class":606},[585,861,627],{"class":606},[585,863,864,867,869,872,874,876,878,880,882,884,886,888,890,893,895,898],{"class":587,"line":617},[585,865,866],{"class":620},"    create",[585,868,624],{"class":606},[585,870,871],{"class":602}," [",[585,873,660],{"class":606},[585,875,527],{"class":656},[585,877,660],{"class":606},[585,879,663],{"class":606},[585,881,653],{"class":606},[585,883,537],{"class":656},[585,885,660],{"class":606},[585,887,663],{"class":606},[585,889,653],{"class":606},[585,891,892],{"class":656},"author",[585,894,660],{"class":606},[585,896,897],{"class":602},"]",[585,899,900],{"class":606},",\n",[585,902,903,906,908,910,912,914,916,918,920,922,924,926],{"class":587,"line":630},[585,904,905],{"class":620},"    delete",[585,907,624],{"class":606},[585,909,871],{"class":602},[585,911,660],{"class":606},[585,913,527],{"class":656},[585,915,660],{"class":606},[585,917,663],{"class":606},[585,919,653],{"class":606},[585,921,537],{"class":656},[585,923,660],{"class":606},[585,925,897],{"class":602},[585,927,900],{"class":606},[585,929,930],{"class":587,"line":696},[585,931,699],{"class":606},[585,933,934,937,939],{"class":587,"line":702},[585,935,936],{"class":620},"  fields",[585,938,624],{"class":606},[585,940,627],{"class":606},[585,942,944,947,949,951,954,956,958,961,963,965,968,970,974],{"class":587,"line":943},7,[585,945,946],{"class":620},"    title",[585,948,624],{"class":606},[585,950,638],{"class":606},[585,952,953],{"class":620}," type",[585,955,624],{"class":606},[585,957,653],{"class":606},[585,959,960],{"class":656},"text",[585,962,660],{"class":606},[585,964,663],{"class":606},[585,966,967],{"class":620}," required",[585,969,624],{"class":606},[585,971,973],{"class":972},"sfNiH"," true",[585,975,693],{"class":606},[585,977,979,982,984,986,988,990,992,994,996,998,1001,1003,1005,1008,1010,1012,1014,1016,1018,1020,1022,1025,1027,1029,1031,1033,1035,1038,1040],{"class":587,"line":978},8,[585,980,981],{"class":620},"    note",[585,983,624],{"class":606},[585,985,638],{"class":606},[585,987,953],{"class":620},[585,989,624],{"class":606},[585,991,653],{"class":606},[585,993,960],{"class":656},[585,995,660],{"class":606},[585,997,663],{"class":606},[585,999,1000],{"class":620}," access",[585,1002,624],{"class":606},[585,1004,638],{"class":606},[585,1006,1007],{"class":620}," read",[585,1009,624],{"class":606},[585,1011,871],{"class":602},[585,1013,660],{"class":606},[585,1015,527],{"class":656},[585,1017,660],{"class":606},[585,1019,897],{"class":602},[585,1021,663],{"class":606},[585,1023,1024],{"class":620}," update",[585,1026,624],{"class":606},[585,1028,871],{"class":602},[585,1030,660],{"class":606},[585,1032,527],{"class":656},[585,1034,660],{"class":606},[585,1036,1037],{"class":602},"] ",[585,1039,705],{"class":606},[585,1041,693],{"class":606},[585,1043,1045],{"class":587,"line":1044},9,[585,1046,699],{"class":606},[585,1048,1050,1052,1054],{"class":587,"line":1049},10,[585,1051,705],{"class":606},[585,1053,708],{"class":602},[585,1055,711],{"class":606},[484,1057,1058],{},"A rule is one of these:",[501,1060,1061,1071],{},[504,1062,1063],{},[507,1064,1065,1068],{},[510,1066,1067],{},"Rule",[510,1069,1070],{},"Who may",[517,1072,1073,1083,1093,1101],{},[507,1074,1075,1080],{},[522,1076,1077],{},[525,1078,1079],{},"true",[522,1081,1082],{},"Everyone, also visitors without a session",[507,1084,1085,1090],{},[522,1086,1087],{},[525,1088,1089],{},"false",[522,1091,1092],{},"No one",[507,1094,1095,1098],{},[522,1096,1097],{},"A list of roles",[522,1099,1100],{},"Signed-in users with one of these roles",[507,1102,1103,1106],{},[522,1104,1105],{},"A function",[522,1107,1108,1109,1111],{},"Whoever the function returns ",[525,1110,1079],{}," for",[484,1113,1114,1116],{},[525,1115,824],{}," works in four places:",[501,1118,1119,1128],{},[504,1120,1121],{},[507,1122,1123,1126],{},[510,1124,1125],{},"Where",[510,1127,243],{},[517,1129,1130,1149,1160,1175],{},[507,1131,1132,1135],{},[522,1133,1134],{},"A collection",[522,1136,1137,718,1140,718,1143,718,1146],{},[525,1138,1139],{},"read",[525,1141,1142],{},"create",[525,1144,1145],{},"update",[525,1147,1148],{},"delete",[507,1150,1151,1154],{},[522,1152,1153],{},"A global",[522,1155,1156,718,1158],{},[525,1157,1139],{},[525,1159,1145],{},[507,1161,1162,1165],{},[522,1163,1164],{},"The media library",[522,1166,1167,718,1169,718,1171,718,1173],{},[525,1168,1139],{},[525,1170,1142],{},[525,1172,1145],{},[525,1174,1148],{},[507,1176,1177,1180],{},[522,1178,1179],{},"A field",[522,1181,1182,718,1184,718,1186],{},[525,1183,1139],{},[525,1185,1142],{},[525,1187,1145],{},[484,1189,1190,1191,1194,1195,786],{},"For media, set the rules in ",[525,1192,1193],{},"media.access"," of ",[525,1196,1197],{},"defineCms()",[732,1199,1201],{"id":1200},"the-default","The default",[484,1203,1204,1205,1208,1209,1212],{},"Without a rule, everyone reads published content, and signed-in users do the rest. A rule replaces this default for its operation. So ",[525,1206,1207],{},"create: true"," accepts a create without a session, and ",[525,1210,1211],{},"read: [\"admin\"]"," hides the content from visitors.",[1214,1215,1216,1217,1220,1221,1224],"warning",{},"A list of roles has no exception for admins. ",[525,1218,1219],{},"[\"editor\"]"," keeps admins out. Add ",[525,1222,1223],{},"\"admin\""," to the list when admins need access.",[732,1226,1228],{"id":1227},"rule-functions","Rule functions",[484,1230,1231,1232,1234,1235,1237],{},"A function gets the caller and the operation, and returns ",[525,1233,1079],{}," or ",[525,1236,1089],{},". This example lets visitors read published posts, and only admins read drafts:",[575,1239,1241],{"className":577,"code":1240,"language":580,"meta":581,"style":581},"access: {\n  read: ({ user, draft }) => !draft || user?.role === \"admin\",\n},\n",[525,1242,1243,1252,1305],{"__ignoreMap":581},[585,1244,1245,1248,1250],{"class":587,"line":588},[585,1246,824],{"class":1247},"sBMFI",[585,1249,624],{"class":606},[585,1251,627],{"class":606},[585,1253,1254,1257,1259,1262,1266,1268,1271,1274,1277,1280,1283,1286,1288,1291,1294,1297,1299,1301,1303],{"class":587,"line":610},[585,1255,1256],{"class":1247},"  read",[585,1258,624],{"class":606},[585,1260,1261],{"class":606}," ({",[585,1263,1265],{"class":1264},"sHdIc"," user",[585,1267,663],{"class":606},[585,1269,1270],{"class":1264}," draft",[585,1272,1273],{"class":606}," })",[585,1275,1276],{"class":838}," =>",[585,1278,1279],{"class":606}," !",[585,1281,1282],{"class":602},"draft",[585,1284,1285],{"class":606}," ||",[585,1287,1265],{"class":602},[585,1289,1290],{"class":606},"?.",[585,1292,1293],{"class":602},"role",[585,1295,1296],{"class":606}," ===",[585,1298,653],{"class":606},[585,1300,527],{"class":656},[585,1302,660],{"class":606},[585,1304,900],{"class":606},[585,1306,1307],{"class":587,"line":617},[585,1308,1309],{"class":606},"},\n",[484,1311,1312],{},"It gets these arguments:",[501,1314,1315,1325],{},[504,1316,1317],{},[507,1318,1319,1322],{},[510,1320,1321],{},"Argument",[510,1323,1324],{},"Value",[517,1326,1327,1346,1363,1373,1386,1396,1411,1425],{},[507,1328,1329,1334],{},[522,1330,1331],{},[525,1332,1333],{},"user",[522,1335,1336,1337,555,1340,1342,1343],{},"The signed-in user with ",[525,1338,1339],{},"id",[525,1341,1293],{},", or ",[525,1344,1345],{},"null",[507,1347,1348,1353],{},[522,1349,1350],{},[525,1351,1352],{},"apiKey",[522,1354,1355,1356,1359,1360],{},"The ",[488,1357,1358],{"href":210},"API key"," of the request, or ",[525,1361,1362],{},"undefined",[507,1364,1365,1370],{},[522,1366,1367],{},[525,1368,1369],{},"cms",[522,1371,1372],{},"The local API, to read other content",[507,1374,1375,1383],{},[522,1376,1377,718,1380],{},[525,1378,1379],{},"collection",[525,1381,1382],{},"global",[522,1384,1385],{},"The name of the target",[507,1387,1388,1393],{},[522,1389,1390],{},[525,1391,1392],{},"locale",[522,1394,1395],{},"The language of the operation",[507,1397,1398,1402],{},[522,1399,1400],{},[525,1401,1339],{},[522,1403,1404,1405,718,1407,555,1409],{},"The document, for ",[525,1406,1139],{},[525,1408,1145],{},[525,1410,1148],{},[507,1412,1413,1418],{},[522,1414,1415],{},[525,1416,1417],{},"data",[522,1419,1420,1421,555,1423],{},"The input, for ",[525,1422,1142],{},[525,1424,1145],{},[507,1426,1427,1431],{},[522,1428,1429],{},[525,1430,1282],{},[522,1432,1433,1435,1436,1438],{},[525,1434,1079],{}," when a ",[525,1437,1139],{}," asks for drafts",[484,1440,1441,1443,1444,1447],{},[525,1442,1145],{}," also covers saving a draft, publishing, unpublishing and ",[488,1445,1446],{"href":156},"scheduling",". A scheduled publish runs later as the server, so the rule is checked when it is scheduled.",[493,1449,1451],{"id":1450},"where-the-rules-apply","Where the rules apply",[484,1453,1454],{},"The server checks the rules on every read and write, whoever asks:",[501,1456,1457,1466],{},[504,1458,1459],{},[507,1460,1461,1464],{},[510,1462,1463],{},"Caller",[510,1465,819],{},[517,1467,1468,1476,1491,1501,1511,1524],{},[507,1469,1470,1473],{},[522,1471,1472],{},"The admin",[522,1474,1475],{},"Applied",[507,1477,1478,1488],{},[522,1479,1480,1481,1484,1485],{},"Your pages: ",[525,1482,1483],{},"Astro.locals.tenon"," and Nuxt's ",[525,1486,1487],{},"useTenon()",[522,1489,1490],{},"Applied, for the visitor or editor of the request",[507,1492,1493,1499],{},[522,1494,1495,1498],{},[525,1496,1497],{},"cms.withSession(request)",", as in TanStack Start",[522,1500,1490],{},[507,1502,1503,1509],{},[522,1504,1505,1506],{},"The HTTP API and ",[525,1507,1508],{},"createClient()",[522,1510,1475],{},[507,1512,1513,1521],{},[522,1514,1355,1515,1517,1518,1520],{},[525,1516,1369],{}," you import, and the ",[525,1519,1369],{}," that hooks get",[522,1522,1523],{},"Skipped",[507,1525,1526,1531],{},[522,1527,1528,1530],{},[525,1529,1483],{}," on a prerendered page",[522,1532,1533],{},"Skipped. The page renders at build time, without a request.",[484,1535,1536],{},"The result is the same for every caller where the rules apply:",[542,1538,1539,1546,1552,1555,1565],{},[545,1540,1541,1542,1545],{},"A read leaves out documents the caller may not read. So do ",[488,1543,1544],{"href":113},"relations"," and links in rich text.",[545,1547,1548,1549,786],{},"A field the caller may not read is missing from the result. A filter on it answers ",[525,1550,1551],{},"400",[545,1553,1554],{},"A field the caller may not change keeps its stored value. The input for it is dropped.",[545,1556,1557,1558,1561,1562,786],{},"Denied without a session answers ",[525,1559,1560],{},"401",". Denied with one answers ",[525,1563,1564],{},"403",[545,1566,1567],{},"The admin also hides what the user may not read, and shows read-only what they may not change.",[484,1569,1570,1573],{},[525,1571,1572],{},"withSession()"," returns an instance for the user of the request. Use it when your own server code acts for a visitor or an editor:",[575,1575,1577],{"className":577,"code":1576,"language":580,"meta":581,"style":581},"const tenon = await cms.withSession(request);\n\u002F\u002F Throws ForbiddenError when the user may not update posts.\nawait tenon.update(\"posts\", id, data);\n",[525,1578,1579,1605,1610],{"__ignoreMap":581},[585,1580,1581,1584,1587,1589,1592,1595,1597,1600,1603],{"class":587,"line":588},[585,1582,1583],{"class":838},"const",[585,1585,1586],{"class":602}," tenon ",[585,1588,845],{"class":606},[585,1590,1591],{"class":591}," await",[585,1593,1594],{"class":602}," cms",[585,1596,786],{"class":606},[585,1598,1599],{"class":598},"withSession",[585,1601,1602],{"class":602},"(request)",[585,1604,711],{"class":606},[585,1606,1607],{"class":587,"line":610},[585,1608,1609],{"class":613},"\u002F\u002F Throws ForbiddenError when the user may not update posts.\n",[585,1611,1612,1615,1618,1620,1622,1624,1626,1629,1631,1633,1636,1638,1641],{"class":587,"line":617},[585,1613,1614],{"class":591},"await",[585,1616,1617],{"class":602}," tenon",[585,1619,786],{"class":606},[585,1621,1145],{"class":598},[585,1623,603],{"class":602},[585,1625,660],{"class":606},[585,1627,1628],{"class":656},"posts",[585,1630,660],{"class":606},[585,1632,663],{"class":606},[585,1634,1635],{"class":602}," id",[585,1637,663],{"class":606},[585,1639,1640],{"class":602}," data)",[585,1642,711],{"class":606},[1214,1644,1645,1646,1648,1649,1651],{},"A page that shows content your rules hide from visitors MUST read through ",[525,1647,1572],{}," or HTTP, and MUST NOT be prerendered. The ",[525,1650,1369],{}," you import reads everything.",[493,1653,1655],{"id":1654},"limit-to-some-documents","Limit to some documents",[484,1657,1658,1659,718,1661,1234,1663,1665,1666,1669,1670,1672],{},"A rule for ",[525,1660,1139],{},[525,1662,1145],{},[525,1664,1148],{}," can return a ",[525,1667,1668],{},"where"," instead of ",[525,1671,1079],{},". The caller then only reaches the documents that match.",[484,1674,1675],{},"This example lets authors change only their own posts. Everyone else may change all of them:",[575,1677,1679],{"className":577,"code":1678,"filename":829,"language":580,"meta":581,"style":581},"export const posts = defineCollection({\n  access: {\n    update: ({ user }) => (user?.role === \"author\" ? { createdBy: user.id } : true),\n    delete: ({ user }) => (user?.role === \"author\" ? { createdBy: user.id } : true),\n  },\n  fields: {\n    title: { type: \"text\", required: true },\n  },\n});\n",[525,1680,1681,1697,1705,1765,1817,1821,1829,1857,1861],{"__ignoreMap":581},[585,1682,1683,1685,1687,1689,1691,1693,1695],{"class":587,"line":588},[585,1684,592],{"class":591},[585,1686,839],{"class":838},[585,1688,842],{"class":602},[585,1690,845],{"class":606},[585,1692,848],{"class":598},[585,1694,603],{"class":602},[585,1696,607],{"class":606},[585,1698,1699,1701,1703],{"class":587,"line":610},[585,1700,857],{"class":620},[585,1702,624],{"class":606},[585,1704,627],{"class":606},[585,1706,1707,1710,1712,1714,1716,1718,1720,1723,1725,1728,1731,1733,1735,1737,1740,1742,1745,1747,1749,1751,1754,1756,1759,1761,1763],{"class":587,"line":617},[585,1708,1709],{"class":598},"    update",[585,1711,624],{"class":606},[585,1713,1261],{"class":606},[585,1715,1265],{"class":1264},[585,1717,1273],{"class":606},[585,1719,1276],{"class":838},[585,1721,1722],{"class":602}," (user",[585,1724,1290],{"class":606},[585,1726,1727],{"class":602},"role ",[585,1729,1730],{"class":606},"===",[585,1732,653],{"class":606},[585,1734,892],{"class":656},[585,1736,660],{"class":606},[585,1738,1739],{"class":606}," ?",[585,1741,638],{"class":606},[585,1743,1744],{"class":620}," createdBy",[585,1746,624],{"class":606},[585,1748,1265],{"class":602},[585,1750,786],{"class":606},[585,1752,1753],{"class":602},"id ",[585,1755,705],{"class":606},[585,1757,1758],{"class":606}," :",[585,1760,973],{"class":972},[585,1762,708],{"class":602},[585,1764,900],{"class":606},[585,1766,1767,1769,1771,1773,1775,1777,1779,1781,1783,1785,1787,1789,1791,1793,1795,1797,1799,1801,1803,1805,1807,1809,1811,1813,1815],{"class":587,"line":630},[585,1768,905],{"class":598},[585,1770,624],{"class":606},[585,1772,1261],{"class":606},[585,1774,1265],{"class":1264},[585,1776,1273],{"class":606},[585,1778,1276],{"class":838},[585,1780,1722],{"class":602},[585,1782,1290],{"class":606},[585,1784,1727],{"class":602},[585,1786,1730],{"class":606},[585,1788,653],{"class":606},[585,1790,892],{"class":656},[585,1792,660],{"class":606},[585,1794,1739],{"class":606},[585,1796,638],{"class":606},[585,1798,1744],{"class":620},[585,1800,624],{"class":606},[585,1802,1265],{"class":602},[585,1804,786],{"class":606},[585,1806,1753],{"class":602},[585,1808,705],{"class":606},[585,1810,1758],{"class":606},[585,1812,973],{"class":972},[585,1814,708],{"class":602},[585,1816,900],{"class":606},[585,1818,1819],{"class":587,"line":696},[585,1820,699],{"class":606},[585,1822,1823,1825,1827],{"class":587,"line":702},[585,1824,936],{"class":620},[585,1826,624],{"class":606},[585,1828,627],{"class":606},[585,1830,1831,1833,1835,1837,1839,1841,1843,1845,1847,1849,1851,1853,1855],{"class":587,"line":943},[585,1832,946],{"class":620},[585,1834,624],{"class":606},[585,1836,638],{"class":606},[585,1838,953],{"class":620},[585,1840,624],{"class":606},[585,1842,653],{"class":606},[585,1844,960],{"class":656},[585,1846,660],{"class":606},[585,1848,663],{"class":606},[585,1850,967],{"class":620},[585,1852,624],{"class":606},[585,1854,973],{"class":972},[585,1856,693],{"class":606},[585,1858,1859],{"class":587,"line":978},[585,1860,699],{"class":606},[585,1862,1863,1865,1867],{"class":587,"line":1044},[585,1864,705],{"class":606},[585,1866,708],{"class":602},[585,1868,711],{"class":606},[542,1870,1871,1874,1886],{},[545,1872,1873],{},"Reads only return matching documents. An update or delete of another document is denied.",[545,1875,1876,1877,1879,1880,555,1883,786],{},"A ",[525,1878,1668],{}," checks equal values of top-level fields, and of ",[525,1881,1882],{},"createdBy",[525,1884,1885],{},"updatedBy",[545,1887,1888,1889,555,1891,1893],{},"Every document stores ",[525,1890,1882],{},[525,1892,1885],{},": the ids of the users who created it and changed it last. Visitors without a session do not get them.",[493,1895,490],{"id":1896},"api-keys",[484,1898,1899,1900,1902,1903,1907],{},"A script or another service uses an ",[488,1901,1358],{"href":210}," instead of a user. An admin picks what each key may do, and your rules still run for it. ",[488,1904,1906],{"href":1905},"\u002Fdocs\u002Fcore\u002Fusers-and-access\u002Fapi-keys#keys-and-rules","Keys and rules"," shows how the two combine.",[493,1909,1911],{"id":1910},"related-resources","Related resources",[542,1913,1914,1919,1924,1930,1935],{},[545,1915,1916,1918],{},[488,1917,201],{"href":202},": sign-in methods and recovery.",[545,1920,1921,1923],{},[488,1922,490],{"href":210},": create keys and set what they may do.",[545,1925,1926,1929],{},[488,1927,1928],{"href":160},"HTTP API and client",": what is public, and how to call the API.",[545,1931,1932,1934],{},[488,1933,163],{"href":164},": read and write from another origin with a key.",[545,1936,1937,1939],{},[488,1938,171],{"href":172},": run code before and after writes.",[1941,1942,1943],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}",{"title":581,"searchDepth":610,"depth":610,"links":1945},[1946,1950,1954,1955,1956,1957],{"id":495,"depth":610,"text":496,"children":1947},[1948,1949],{"id":734,"depth":617,"text":735},{"id":789,"depth":617,"text":790},{"id":565,"depth":610,"text":819,"children":1951},[1952,1953],{"id":1200,"depth":617,"text":1201},{"id":1227,"depth":617,"text":1228},{"id":1450,"depth":610,"text":1451},{"id":1654,"depth":610,"text":1655},{"id":1896,"depth":610,"text":490},{"id":1910,"depth":610,"text":1911},"Roles, rules and API keys.","md",null,{},true,{"title":205,"description":1958},"9cQ0i27qaaumRrOXUwyC-mFDslqd5uYtOIhTMnyXYlg",[1966,1968],{"title":201,"path":202,"stem":203,"description":1967,"children":-1},"How people sign in to the admin, and the methods to pick from.",{"title":209,"path":210,"stem":211,"description":1969,"children":-1},"Access for scripts and other services, without a user.",1795884644457]