Repository navigation
fix(console): Notification Settings is read-only, with its reason, for a caller with no write grant - #35313
Merged
objectstack-fleet[bot] merged 5 commits intoNov 19, 2026
Conversation
… write grant on sys_notification_preference Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY Co-authored-by: Claude <noreply@anthropic.com>
…o write grant Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY Co-authored-by: Claude <noreply@anthropic.com>
… own-row grant read Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY Co-authored-by: Claude <noreply@anthropic.com>
…ngs read-only line Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY Final head for L1:
|
Contributor
Author
|
repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4 维护者速读
席位核对 — ACCEPT (L1-a) · repo:objectstack#5 · head
|
Contributor
Author
|
repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY Landing · area ux-1 · 2026-11-19T05:17Z
ACCEPT 7000445730 (L1-a) at head |
objectstack-fleet
Bot
deleted the
claude/issue-35192-notification-settings-read-only
branch
November 19, 2026 05:37
This was referenced Nov 19, 2026
Closed
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 Bill · project thread
Fixes #35192
Clause-②: no
Metadata-protocol: none
维护者速读
org_external)打开 Account 应用的「通知设置」时,页面现在整页只读:所有开关、摘要下拉和免打扰时段都置灰,顶部一行说明原因(已译成全部 11 种内置语言),每个置灰控件都把这行原因作为无障碍描述,且不会发出任何写请求。external_default权限集对sys_notification_preference没有新建或编辑授权,之前页面照样给出可操作的控件,每次点击都回 403。判断依据是框架自己给当前用户的权限答复(/me/permissions,经usePermissions()读取),页面不看身份名称。NotificationSettingsPage.tsx中writeGranted的取值与apply里的守卫;② 同文件新增的只读提示Alert及各控件的aria-describedby;③NotificationSettingsPage.test.tsx末尾三种身份的新测试。ui/下运行npx vitest run --root . packages/app-shell/src/console/notification-settings/,预期 2 个测试文件、31 个测试全部通过。What changes
NotificationSettingsPagereads the caller's grant onsys_notification_preferencethroughusePermissions()(the console's/me/permissionsanswer, the same readObjectView's personal-view grant uses). A write is a create (no own row yet) or an edit (the person's own row), so the page is read-only when the caller holds neither.readonlyface), one visible reason sits at the top of the page (notificationSettings.readOnly), and each disabled control pointsaria-describedbyat it.applyalso refuses to send while the grant is missing, so no write leaves the page even if a handler fires (achangeevent still reaches a disabled select).InspectorReadOnlyReasonrationale), and the page already explains its other limits as visible hint lines (digestNoOff,quietHoursNoClear). Per the claim's Choice line, the nav entry stays: the external member still sees what is in force for them.!perms.isLoaded || perms.can(...)).notificationSettings.readOnlyin all 11 built-in locales (en, ar, de, es, fr, ja, ko, pt-BR, ru, zh-Hans, zh-Hant).@object-ui/app-shellpatch,@object-ui/i18npatch.Tests
Head
28e8973f5b. Three persona pins inNotificationSettingsPage.test.tsx(new top-leveldescribe), each through the realMePermissionsProviderover that persona's/me/permissionsanswer, shaped as the default sets serve it:org_external(external_default: no row for the object, no'*'): reason shown, cell / digest / Save disabled and described by the reason, quiet hours read as text, the in-force sources still drawn; clicking a cell, changing the digest and clicking Save send no create and no update, and the door is read once.member_default: create + edit on the object) and organization administrator (organization_admin's'*'row): no reason, controls enabled, a switch creates the person's own row. These are the controls.Test run (targeted)
Ablations (two, both red, both restored)
Each through
scripts/ablation-replace.mjson the committed head (the page is imported from source by relative path, so no build sits between the edit and the run):writeGrantedforced totrue: anchor 1 to 0, blobe7f9c1e8b056to11dcab5d0934; the external-member pin fails (Tests 1 failed | 14 passed (15)), the member and admin pins stay green. Restored: blob equals HEAD,git diff HEADempty.!writeGrantedguard inapplyremoved: anchor 1 to 0, blobe7f9c1e8b056tofb6e88e32901; the external-member pin fails onexpected "vi.fn()" to not be called at all, but actually been called 1 times(the digestchange). Restored: blob equals HEAD,git diff HEADempty.Acceptance notes
@object-ui/app-shelltype-checkwas not run locally: the package is a composite program whose references need the built declarations of about 70 workspace packages.Type Check UImeasures it on this PR.@object-ui/i18ntype-checkran green locally after building its closure.Test UIruns it.Verification
Derived gates (dispatch-gates --commands, 40 families) at 28e8973
All 40 derived commands exit 0, plus
pnpm check:changeset-fixed(its roster sits under.changeset/). Reconciliation:dispatch-gates --ran: 40 derived famil(ies) accounted for — 40 run, 0 NOT-MEASURED (a DERIVED zero — all 40 recorded an exit code and none of them is 3).pnpm --dir ui exec vitest run scripts/:Tests 5092 passed | 2 skipped (5094).overlap-check:VERDICT clean exit 0against origin/main and the one open PR sharing the locale files (#35261).Fix round (head
0973664e61)The first head
28e8973f5bturned two Test UI shards red; both were this PR's and both are fixed. The Tests section above describes the first round.ui/packages/plugin-form/src/affordanceGrantMap-12082.test.tsx(the census of raw CRUD grant reads) receivedNotificationSettingsPage.tsxas a new reader. Added anOUT_OF_FAMILYentry with its reason (the caller's own preference row, already graded out of family asmyPreferences.ts :: sendPreferenceWrite), and amended thoseWRITE_SITESreasons to name the read that now gates the writes. NoAFFORDANCE_GRANTSrow (that would change published@object-ui/core). This file is outside the dispatch fence, edited because this PR turned it red.zh-hant-generated.test.ts—zh-Hant.tsis generated fromzh-Hans; the hand-written line was replaced bypnpm --filter @object-ui/i18n gen:zh-hant(one line).0973664e61: those two files +console/notification-settings/→ 4 files / 97 tests passed; census red leg reproduces the CI failure under ablation, restored blob == HEAD; 40/40 derived gates exit 0; overlap-check clean (incl. PR feat(security, create-objectstack): an AI-built app with its own capabilities and no connector plugins installs as an unmanaged copy #35261, which shares the locale files).🤖 Generated with Claude Code
https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY