feat(identity): align client user-context with ADR-0068#1990
Merged
Conversation
Mirror the framework's unified EvalUser contract on the client so a predicate evaluates identically across client, server-formula and server-RLS. - ExpressionProvider: expose the canonical `current_user` plus the back-compat `user` alias and the server-RLS-parity `ctx.user` alias, all pointing at the same user object (predicate scope + evaluator). - useIsWorkspaceAdmin: accept the canonical org_owner/org_admin role names emitted into user.roles[] by the server customSession, so admin detection survives the removal of the `user.role='admin'` overwrite. No new @objectstack/spec npm exports are consumed, so this is not publish-gated on the framework release. Verified: app-shell build + 766 tests, auth build + 107 tests, console build 33/33, Playwright chromium e2e 10/10 (real-browser render, no JS errors).
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Client counterpart to ADR-0068. Mirrors the framework unified
EvalUsercontract on the client so a predicate evaluates identically across client, server-formula, and server-RLS.Changes
ExpressionProvider: expose the canonicalcurrent_userplus the back-compatuseralias and the server-RLS-parityctx.useralias — all pointing at the same user object (both the predicate scope and the evaluator context).useIsWorkspaceAdmin: accept the canonicalorg_owner/org_adminrole names now emitted intouser.roles[]by the servercustomSession, so admin detection survives the removal of theuser.role='admin'overwrite footgun.Not publish-gated
No new
@objectstack/specnpm exports are consumed (inline-compatible), so this can merge independently of the framework release (objectstack-ai/framework#2312).Verification
🤖 Generated with Claude Code