Uh oh!
There was an error while loading. Please reload this page.
feat(platform-objects): add sys_user.manager_id to back the own_and_reports scope (ADR-0057) - #2133
Merged
Merged
Conversation
…e path (ADR-0056 D7) `createStandaloneStack` (the boot path used by `objectstack dev`/`serve`/`start` when serving a compiled `dist/objectstack.json` with no host `objectstack.config.ts`) surfaced `objects`/`requires`/`manifest` from the artifact bundle but dropped `permissions[]` and `roles[]`. So the CLI's `appDefaultProfileName(config.permissions)` saw `undefined` and SecurityPlugin fell back to the built-in owner-only `member_default` — an app `isDefault` profile carrying e.g. `readScope: 'unit_and_below'` was silently ignored. The config-load path was unaffected (the app's `permissions` survived via the original stack object). Surface `permissions[]` and `roles[]` from the artifact bundle, mirroring the existing `objects`/`requires`/`manifest` handling, so the artifact-serve path applies the app default profile exactly like the config-load path. Tests: - packages/runtime/src/standalone-stack.test.ts — the artifact-serve path now surfaces permissions/roles (incl. readScope) and drives appDefaultProfileName. - packages/dogfood/test/showcase-scope-depth-fallback.dogfood.test.ts — a profile resolved by name as fallbackPermissionSet widens the visibility matrix (unit_and_below) with the reference hierarchy resolver, and fails closed without it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…eports scope (ADR-0057) The own_and_reports hierarchy scope was implemented in the resolver (walks sys_user.manager_id) but no field backed it, so it always degraded to owner-only. Add manager_id (self-lookup) + en/zh/ja/es labels, and extend the scope-depth dogfood to prove it: a user sees their own records plus everyone down their manager chain (alice ← bob ← carol), not off-chain peers. Dogfood 7/7. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📓 Docs Drift CheckThis PR changes 3 package(s): 18 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Jun 21, 2026
Closed
Closed
Closed
os-zhuang added a commit
that referenced
this pull request
Jul 1, 2026
feat(import): route list import through server /import (write-mode UI + special-value coercion) (#2133) objectui@2b86379384f0f6e99d9a5bb81d73017fd6f99cef
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 freeto 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.
What
The ADR-0057
own_and_reportshierarchy scope (caller + everyone down their manager chain) was implemented in the resolver (it walkssys_user.manager_id) but unbacked — nothing onsys_usermodelled a manager, so the scope silently degraded to owner-only. This adds the missing field and proves the scope end-to-end.Changes
sys_user.manager_id— a self-lookup (Field.lookup('sys_user')) in a newOrganizationgroup. The reporting chainown_and_reportswalks.manager_idlabel in en / zh / ja / es (Manager / 经理 / マネージャー / Gerente).showcase-scope-depth.dogfood.test.tsnow coversown_and_reports: a user sees their own records plus everyone down theirmanager_idchain (alice ← bob ← carol), not off-chain peers; a leaf report sees only their own. 7/7 green (was 5).Why now
Surfaced while rounding out the enterprise hierarchy-authz verification:
unit/unit_and_beloware proven (here + the cloud security-enterprise conformance test), butown_and_reportshad no data model behind it. This makes all three scopes real and tested.🤖 Generated with Claude Code