Commit a3a5abf
feat(identity): align client user-context with ADR-0068 (#1990)
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).
Co-authored-by: zhuangjianguo <zhuangjianguo@steedos.com>1 parent 8a3b351 commit a3a5abf
2 files changed
Lines changed: 18 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
61 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
62 | 70 | | |
63 | 71 | | |
64 | 72 | | |
| |||
76 | 84 | | |
77 | 85 | | |
78 | 86 | | |
79 | | - | |
| 87 | + | |
| 88 | + | |
80 | 89 | | |
81 | 90 | | |
82 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
18 | 24 | | |
19 | 25 | | |
20 | 26 | | |
| |||
0 commit comments