Repository navigation
test(portal): measure the v0.6 portal platform checks V1–V5 on 18.1.0 - #87
Merged
Merged
Conversation
Add test/portal-platform.test.ts, which boots the app with a probe module (portal positions, a portal permission set per 04 §3.4, another app's isDefault set, and identity-writing flows) and drives real invitations of external members. Record the results in 07 §6.2 and the consequences in 04 §3.3/§3.6: - V1 pass: external members see only themselves in sys_user, sys_member and the organization directory doors; requires membership policy invite-only (auto binds a sign-up as a plain member before accepting). - V2 partial: runAs user flows write position assignments and direct grants only when started by an organization admin; delegated scopes cannot place external members. - V3 fail: no flow can create an invitation (objectstack#25251 ruling, ADR-0092); admins invite on the members page. Registered as PF17. - V4 pass: child records need edit on the parent; read-only parent fields refuse the whole write. - V5 pass: other apps' isDefault sets never reach external members. Closes #77 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2eKzxj9FMFgrBfPrB4
marchtian
pushed a commit
that referenced
this pull request
Nov 2, 2026
Resolve 04 §3.3 and 07 §6.2 against the U1 platform checks (#87): keep the invite-only prerequisite and the org-admin provisioning path, drop the per-supplier position steps, and record V4 as rechecked on the formal metadata. V6 stays the v0.6 exit condition. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2dk71wiRBasBp9drzu
This was referenced Nov 2, 2026
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.
Requested by 田騏 · project thread
Closes #77 (v0.6 U1).
What changed
test/portal-platform.test.ts(new, 24 cases): boots the app on 18.1.0 together with a probe module (portal positionssrm_vendor_probe_*, a portal permission set written as 04 §3.4 prescribes, a parent-read-only control set, a delegated-admin set, another app'sisDefaultset, and five one-node flows that write identity rows). Portal users enter through the real path: an admin invites them with roleexternal, they sign up, accept the invitation, sign in again. U2/U3 can reuse the fixtures; the probe positions, permission sets andportal_positionare replaced by the real metadata in U2.invite-only), operator of portal opening is an organization admin, "开通门户" flow isrunAs: 'user', revocation after elimination/blacklist is a notification to the org admin; 04 §3.6 V1 result; 02 §4.x invitation sentence pointed at V3 (was mistakenly V5).Results (07 §6.2)
sys_user,sys_member, by-id reads,list-members,get-full-organization,list-invitations. Requiresinvite-only: underautoa sign-up is bound as a plain member and reads the whole directory until it accepts (pinned by a control test).runAs: 'system'refused (#25251).runAs: 'user'writessys_user_positionandsys_user_permission_setwhen started by an orgowner/admin; refused for a category manager (ADR-0090 D12). A delegatedadminScopecannot place an external member (needs a business-unit anchor; externals are not placed in BUs).system(#25251) and foruser, even an org admin (ADR-0092:sys_invitationwritten only by the auth endpoints).invite-memberitself is org-admin only (403 for a category manager). Fallback: admin invites on the members page.controlled_by_parentwritesstatus/verified, no delete. Parent read-only ⇒ child insert/update refused, so parent edit is required. A read-only parent field in a payload refuses the whole write (403), not dropped. Bank account insert needssrm_view_bank_account_no.isDefaultexternal_default, notmember_default).No new platform issue: both non-passing items are the explicit #25251 ruling (identity writes not from elevated automation; invitations via organization endpoints) and the #25233 design (externals not in business units). Registered as PF17.
Verification
pnpm validate,pnpm lint,pnpm typecheck,pnpm i18n:check,pnpm test(24 files passed, 1 skipped as before; 275 tests),pnpm buildall pass locally.Generated by Claude Code