From 7dbb95d6c1dd7245e50d3aaadd26ee24f3506ba1 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 7 Nov 2026 22:35:09 +0100 Subject: access: the user registry _continuum/users/: one entry per user, with capabilities by path (read, write) granted by whom and when, and a disabled flag. Read leniently: a damaged entry gives less, never more. Protocol data stays apart: a capability outside _continuum never covers it. Auth plan M1. --- src/document/store.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/document/store.rs') diff --git a/src/document/store.rs b/src/document/store.rs index f18f2fa..db5ecbc 100644 --- a/src/document/store.rs +++ b/src/document/store.rs @@ -650,6 +650,11 @@ fn summary( Ok(JsonValue::Object(out)) } +/// Whether `path` holds a map (one, or concurrent ones merged). +pub(crate) fn is_map(doc: &impl ReadDoc, path: &[String]) -> bool { + matches!(resolve_through(doc, path), Ok(Some(Resolved::Maps(_)))) +} + /// Keys of the merged map at `path`; empty if it doesn't exist or isn't a map. pub(crate) fn keys_at(doc: &impl ReadDoc, path: &[String]) -> Result, StoreError> { Ok(match resolve_through(doc, path)? { -- cgit v1.3.1