Repository navigation
#1372: restrictedToMembers Core field on collection schema (ADR-037) - #1400
Conversation
|
REQUEST CHANGES ⏳ Initial review, top commit Small and correct: 🟢 Cross-repo contract — confirm "absent" reads as open. cloud#23 gates on 🟢 Test coupling to #1399. The Otherwise good to go once the cross-repo contract above is confirmed. |
Land the open-core data plane for ADR-037's opt-in restriction: a Core-protected boolean `restrictedToMembers` on the `collection` schema (default false = open/organizational). The Pro RLS layer reads `properties->>'restrictedToMembers'` to gate access (nodespace-sync#124); core only declares the inert, protected property. The member_of edge `permission` (admin/modify/readOnly, default modify) is a free-form property on the native member_of edge — the RLS reads it directly, so no schema change is needed. Toggling restriction is a normal node property update and adding a person member with a permission is a normal member_of relationship create; the Pro-side enforcement flows (auto-admin, last-admin, onboarding) are nodespace-sync#125/#126. Depends on #133 (PersonNode, the person-only membership check). Tests + schema-count asserts updated. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Addressed. Rebased onto merged main (commit f5256f3): dropped the obsolete 🟢 "Absent reads as open" — confirmed. 🟢 Test coupling to the person schema: now that #1401 is in main, this test stands on main as-is. |
…37) (#1400) Land the open-core data plane for ADR-037's opt-in restriction: a Core-protected boolean `restrictedToMembers` on the `collection` schema (default false = open/organizational). The Pro RLS layer reads `properties->>'restrictedToMembers'` to gate access (nodespace-sync#124); core only declares the inert, protected property. The member_of edge `permission` (admin/modify/readOnly, default modify) is a free-form property on the native member_of edge — the RLS reads it directly, so no schema change is needed. Toggling restriction is a normal node property update and adding a person member with a permission is a normal member_of relationship create; the Pro-side enforcement flows (auto-admin, last-admin, onboarding) are nodespace-sync#125/#126. Depends on #133 (PersonNode, the person-only membership check). Tests + schema-count asserts updated. Co-authored-by: Mayank Tomar <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Open-core data plane for ADR-037's opt-in restriction. Closes #1372.
Per ADR-028, this covers only inert, local-first data:
restrictedToMembers— a Core-protected boolean on thecollectionschema (defaultfalse= open/organizational). The Pro RLS layer (nodespace-sync#124 / cloud#23) readsproperties->>'restrictedToMembers'to gate access; core just declares the protected property.member_ofpermission(admin/modify/readOnly, default modify) is a free-form property on the nativemember_ofedge — the RLS reads it directly, so no schema change is needed.member_ofrelationship create. No new core API needed for the data plane; the enforcement flows (auto-admin, Last-Admin trigger, onboarding) are nodespace-sync#125/Add Slash Command Entries for Code/Quote Blocks #126.Tests:
restrictedToMembersfield shape; schema-count + no-fields asserts updated.cargo testgreen, clippy clean.