You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(rbac): role carries a FieldMask projection — distinct views, not depth levels
RBAC is classid :: role :: membership, where the role IS a distinct
projection of the class — not a graduated access level. PermissionSpec
already had max_depth (a scalar level: Identity < … < Full), which only
expresses more-vs-less of the same fields. It could not express that two
roles see DISJOINT views of one class — the actual HIPAA mechanism
(health-personnel sees the clinical histogram; invoice sees billing
fields; research sees de-identified aggregate — and that the research
cross-correlation would be unlawful in the invoice purpose).
- contract FieldMask: add FULL (all positions), intersect, is_disjoint —
the ops a projection + a distinctness check need.
- rbac PermissionSpec: add `projection: FieldMask` (default FULL = no
narrowing, depth governs), `with_projection(mask)` builder, `projects(n)`
accessor. The projection is resolved against the class's ClassView field
basis (lance-graph-ogar pulls OgarClassView for that basis).
The projection SLOT is reusable here; the consumer (medcare-rs) hand-rolls
the distinctness ENFORCEMENT — the three clinical roles' masks, and the
invariant that the research projection is disjoint from the identifier
fields. Test: two same-depth roles on one class with disjoint projections.
lance-graph-rbac 15 tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYvNjD8M8LMNYbRy3gq2FP
0 commit comments