fix: expose staging admin entry
Deploy staging to test server / deploy (push) Successful in 3m11s

Use persisted self-hosted roles and the isolated admin origin so authorized staging accounts can discover the protected admin surface.
This commit is contained in:
linmeng
2026-07-29 10:14:39 +08:00
parent f7fd3e6a60
commit 2dac8bc47b
9 changed files with 100 additions and 19 deletions
+9
View File
@@ -27,6 +27,15 @@ test("account API reads and returns the server-configured rectification price",
assert.doesNotMatch(source, /RECTIFICATION_PRICE_CREDITS[^\n]*\?\?\s*["']1["']/);
});
test("account API returns a server-resolved admin entry URL", () => {
assert.match(source, /readIdentityConfig\(process\.env\)/);
assert.match(source, /new URL\("\/admin\/codes", identityConfig\.adminOrigin\)\.toString\(\)/);
assert.match(source, /identityConfig\.provider === "self-hosted"/);
assert.match(source, /: "\/admin\/codes"/);
assert.match(source, /adminUrl,/);
assert.doesNotMatch(source, /NEXT_PUBLIC_ADMIN|process\.env\.AUTH_ADMIN_ORIGIN/);
});
test("account API projects only the minimum case state needed by the homepage", () => {
const caseSelect = source.match(/\.from\("birth_time_rectification_cases"\)[\s\S]*?\.limit\(\d+\)/)?.[0] ?? "";