Skip to content

Commit 5737261

Browse files
os-zhuangclaude
andauthored
fix(setup): drop Advanced nav entries for non-listable objects (#2266)
Browser-dogfooding every Setup menu found two Advanced entries that always render "failed to load": Verifications (sys_verification) and Device Codes (sys_device_code). Both objects intentionally omit `list` from `apiMethods` (sensitive ephemeral secrets), so the generic list-view menu 405s every time. Removed both nav entries + their orphaned zh labels; objects stay reachable by id. (Re-adding a browse menu needs `list` enabled — a security decision.) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent cfd5ac4 commit 5737261

3 files changed

Lines changed: 20 additions & 4 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
"@objectstack/platform-objects": patch
3+
---
4+
5+
fix(setup): drop Advanced nav entries for non-listable objects (sys_verification, sys_device_code)
6+
7+
Dogfooding every Setup menu surfaced two Advanced entries that always render
8+
"无法加载记录 / failed to load": **Verifications** (`sys_verification`) and
9+
**Device Codes** (`sys_device_code`). Both objects deliberately omit `list`
10+
from `apiMethods` (sensitive, ephemeral secrets — verification tokens and OAuth
11+
device-grant codes are not meant to be browsed), so the generic object/list-view
12+
menu can only ever 405. Removed both nav entries (and their orphaned zh labels);
13+
the objects remain reachable by id. Re-adding a browse menu would require
14+
enabling `list` on the object — a security decision, not a nav fix.

packages/platform-objects/src/apps/setup-nav.contributions.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,12 @@ export const SETUP_NAV_CONTRIBUTIONS: NavigationContribution[] = [
113113
items: [
114114
{ id: 'nav_oauth_apps', type: 'object', label: 'OAuth Applications', objectName: 'sys_oauth_application', icon: 'app-window' },
115115
{ id: 'nav_jwks', type: 'object', label: 'Signing Keys (JWKS)', objectName: 'sys_jwks', icon: 'key-round' },
116-
{ id: 'nav_verifications', type: 'object', label: 'Verifications', objectName: 'sys_verification', icon: 'mail-check' },
117-
{ id: 'nav_device_codes', type: 'object', label: 'Device Codes', objectName: 'sys_device_code', icon: 'qr-code' },
116+
// `sys_verification` (email/phone tokens) and `sys_device_code` (OAuth
117+
// device-grant codes) deliberately omit `list` from their `apiMethods`
118+
// (sensitive, ephemeral secrets — not browsable), so an object/list-view
119+
// nav entry for them can only ever render "failed to load". They're
120+
// reachable by id (get) when needed; no browse menu. (Re-adding requires
121+
// enabling `list` on the object — a security decision.)
118122
{ id: 'nav_accounts', type: 'object', label: 'Identity Links', objectName: 'sys_account', icon: 'link-2' },
119123
{ id: 'nav_user_preferences', type: 'object', label: 'User Preferences', objectName: 'sys_user_preference', icon: 'sliders' },
120124
],

packages/platform-objects/src/apps/translations/zh-CN.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ export const zhCN: TranslationData = {
8484

8585
nav_oauth_apps: { label: 'OAuth 应用' },
8686
nav_jwks: { label: '签名密钥 (JWKS)' },
87-
nav_verifications: { label: '验证记录' },
88-
nav_device_codes: { label: '设备代码' },
8987
nav_accounts: { label: '身份链接' },
9088
nav_user_preferences: { label: '用户偏好' },
9189
nav_metadata: { label: '全部元数据' },

0 commit comments

Comments
 (0)