Adds a per-document restriction model where documents can be marked as
private, requiring explicit user/group membership for access instead of
inheriting collection permissions. Includes:
- New isPrivate column on documents with migration
- Policy updates for restricted document authorization with admin bypass
- Filtering restricted docs from documents.list and collection.documents tree
- Auto-restriction when publishing/moving under a restricted parent
- Membership inheritance from parent documents on publish and move
- Search filtering for restricted documents
- UI for toggling restriction in the share dialog
Security fixes:
- Filter restricted docs in the collectionId branch of documents.list
- Include group memberships when resolving accessible restricted docs
- Propagate isPrivate flag to document structure nodes on move
- Sync document structure when isPrivate changes via BeforeSave hook
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>