kitchen/backend
jtricerolph 6f6e16c88f Replace in-app Access Control with JWT cap enforcement
The in-app page-restriction system (admin-only toggles in Settings) was
nav-hiding only and duplicated functionality already covered by JWT caps
in the main stack auth service. All 9 pages in the restriction list were
already gated in Layout.tsx by existing caps.

Backend: add router-level requireCap() to enforce caps at the API layer:
- reports.py: Depends(require_cap("view"))
- logbook.py: Depends(require_cap("logbook"))
- search.py: Depends(require_cap("invoices"))

Frontend: remove the Access Control settings section entirely:
- Drop pageRestrictions query, restrictedPages/accessSaveMessage state,
  savePageRestrictionsMutation, isSectionAccessible helper
- Remove 'access' from SettingsSection type and sidebarItems
- Strip restrictPath from all sidebar items (no longer needed)

Access management is now fully centralised in the main stack auth service.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-12 23:17:22 +00:00
..
api Replace in-app Access Control with JWT cap enforcement 2026-07-12 23:17:22 +00:00
migrations Wire Azure OCR to central settings toggle; remove redundant Users section 2026-07-12 22:58:32 +00:00
models Wire Azure OCR to central settings toggle; remove redundant Users section 2026-07-12 22:58:32 +00:00
ocr Add .gitignore, remove __pycache__ from tracking 2026-07-12 12:16:04 +00:00
services Wire Azure OCR to central settings toggle; remove redundant Users section 2026-07-12 22:58:32 +00:00
auth.py Add get_current_user_from_token to auth.py; fix missing import in 3 api files 2026-07-12 12:34:01 +00:00
database.py Initial kitchen scaffold — Phase 1 kitchen port (build-verified 2026-07-11) 2026-07-12 12:15:39 +00:00
Dockerfile Initial kitchen scaffold — Phase 1 kitchen port (build-verified 2026-07-11) 2026-07-12 12:15:39 +00:00
main.py Add 'use main stack settings' toggle for third-party integration credentials 2026-07-12 21:57:10 +00:00
requirements.txt Initial kitchen scaffold — Phase 1 kitchen port (build-verified 2026-07-11) 2026-07-12 12:15:39 +00:00
scheduler.py Initial kitchen scaffold — Phase 1 kitchen port (build-verified 2026-07-11) 2026-07-12 12:15:39 +00:00