Skip to content

fix(settings): a scoped admin's Settings Save shows 'Settings saved, but 17 services failed' after service-config PUTs became scope-gated #617

Closed

Description

@cristim

Found in the review of PR #614 (#520 slice: updateServiceConfig now requires an unrestricted account scope, like the global config PUT). The Settings page (frontend/src/settings.ts ~3592-3658) fires ALL 17 per-service PUTs on every Save (settings-service-payment.test.ts ~163 asserts 17 calls), not only the dirty rows, and a scoped admin passes canAccess('admin','*') (~3111) so Save is enabled. After #614 their service PUTs all return 403; Promise.allSettled swallows them and the toast reads 'Settings saved, but 17 services failed: aws/ec2: permission denied...; ...' even though nothing saved, while the global PUT 403 (~3549) gives the clean 'Failed to save settings: permission denied: global configuration...' toast. No data loss (failed services revert their snapshot and stay dirty ~3640-3647; later saves are not blocked); before #614 the same click showed 'Settings saved successfully' while silently writing global defaults.

Acceptance: a scoped admin sees one clear permission-denied message (map a permission-denied service PUT result via isPermissionDeniedError ~90 to the 'Failed to save settings' toast, or skip service PUTs whose fields are not dirty, or hide/disable the global and service settings for scoped users), with a frontend test (jest) covering a scoped admin Save; mind the dirty-snapshot logic from #538/#570/#575 (sentFields, savedSnapshot) and #539. Related: #520, #614, #539.

Activity

  1. IAmJSD commented on Oct 24, 2026

    @IAmJSD
    Collaborator

    Claiming: working on this

  2. self-assigned this
    on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions