Add 'use main stack settings' toggle for third-party integration credentials

Each of Newbook, Resos, SambaPOS, SMTP, and Nextcloud now has a checkbox at the
top of its credentials block. When enabled, the app reads auth credentials from
the central stack settings service (SETTINGS_URL + STACK_INTERNAL_SECRET) and
the local auth fields are grayed out. App-specific fields (base path, GL codes,
keywords, sync intervals, etc.) remain editable regardless.

Backend: new use_global_* columns on kitchen_settings, migration, global_settings_service
with apply_global_overrides() for in-memory credential injection, GET /api/settings/global-status
endpoint, and apply_global_overrides() called in test-connection endpoints and FileArchivalService.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-12 21:57:10 +00:00
parent 62417d59de
commit d7898ba897
10 changed files with 356 additions and 34 deletions

View file

@ -71,6 +71,7 @@ from migrations.add_recipe_text_flag_dismissals import migrate as run_recipe_tex
from migrations.add_llm_infrastructure import migrate as run_llm_infrastructure_migration
from migrations.add_changelog_invoice_link import migrate as run_changelog_invoice_link_migration
from migrations.add_sambapos_portion_name import migrate as run_sambapos_portion_name_migration
from migrations.add_global_settings_flags import migrate as run_global_settings_flags_migration
from scheduler import start_scheduler, stop_scheduler
@ -144,6 +145,7 @@ async def lifespan(app: FastAPI):
await _run("LLM infrastructure", run_llm_infrastructure_migration)
await _run("Changelog invoice link", run_changelog_invoice_link_migration)
await _run("SambaPOS portion name", run_sambapos_portion_name_migration)
await _run("Global settings flags", run_global_settings_flags_migration)
start_scheduler()