[PR #7040] [MERGED] [AI] Enforce file access authorization on sync API endpoints #37091

Closed
opened 2026-04-20 23:53:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/7040
Author: @MatissJanis
Created: 2/20/2026
Status: Merged
Merged: 2/21/2026
Merged by: @MatissJanis

Base: masterHead: matiss/sync-api-file-access-auth


📝 Commits (10+)

  • 4a18e8e [AI] Enforce file access authorization on sync API endpoints
  • a711fdc Refactor file deletion authorization to return error message as text
  • 4124f32 Refactor file upload validation to improve error handling
  • feae796 Add tests to allow admin users to retrieve encryption keys and sync files for other users
  • db16685 Refactor file cleanup in tests to use onTestFinished for better error handling
  • c61be50 Enhance admin capabilities in file management tests
  • f3d8cd0 Add migration to backfill file owners with admin ID
  • e23591b Enhance file access authorization in sync API
  • ad6c823 Update migration to backfill file owners with admin ID to ensure consistent ordering in the query
  • c7f9027 Refactor access control tests for file downloads in sync API

📊 Changes

4 files changed (+581 additions, -32 deletions)

View changed files

packages/sync-server/migrations/1763873600000-backfill-files-owner.js (+19 -0)
📝 packages/sync-server/src/app-sync.test.ts (+469 -17)
📝 packages/sync-server/src/app-sync.ts (+87 -15)
upcoming-release-notes/7040.md (+6 -0)

📄 Description

No description provided


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/7040 **Author:** [@MatissJanis](https://github.com/MatissJanis) **Created:** 2/20/2026 **Status:** ✅ Merged **Merged:** 2/21/2026 **Merged by:** [@MatissJanis](https://github.com/MatissJanis) **Base:** `master` ← **Head:** `matiss/sync-api-file-access-auth` --- ### 📝 Commits (10+) - [`4a18e8e`](https://github.com/actualbudget/actual/commit/4a18e8e3a9ad1e0fd0b38792fc595ef2b2509d8c) [AI] Enforce file access authorization on sync API endpoints - [`a711fdc`](https://github.com/actualbudget/actual/commit/a711fdc23e6f5a6b9a94d907d0c8285f6b8af8bb) Refactor file deletion authorization to return error message as text - [`4124f32`](https://github.com/actualbudget/actual/commit/4124f32775e325886a998c689a7006f19609deb5) Refactor file upload validation to improve error handling - [`feae796`](https://github.com/actualbudget/actual/commit/feae796eda046ac81e283be2e730eedc11ab04fa) Add tests to allow admin users to retrieve encryption keys and sync files for other users - [`db16685`](https://github.com/actualbudget/actual/commit/db166857245b7d5d651b83c2b13e514e0770a0a8) Refactor file cleanup in tests to use onTestFinished for better error handling - [`c61be50`](https://github.com/actualbudget/actual/commit/c61be50df60e32cb8e29fdff4dc130f04b124b7e) Enhance admin capabilities in file management tests - [`f3d8cd0`](https://github.com/actualbudget/actual/commit/f3d8cd04a4cbf40b475e14f1640dc572977fe28e) Add migration to backfill file owners with admin ID - [`e23591b`](https://github.com/actualbudget/actual/commit/e23591b0e5d6de2cbd81f9f28d350e6329c0f75b) Enhance file access authorization in sync API - [`ad6c823`](https://github.com/actualbudget/actual/commit/ad6c8234ffdeed88d8ecf7172b33dfd156271ad6) Update migration to backfill file owners with admin ID to ensure consistent ordering in the query - [`c7f9027`](https://github.com/actualbudget/actual/commit/c7f9027bca246f2d4f9ab699127323276e77e695) Refactor access control tests for file downloads in sync API ### 📊 Changes **4 files changed** (+581 additions, -32 deletions) <details> <summary>View changed files</summary> ➕ `packages/sync-server/migrations/1763873600000-backfill-files-owner.js` (+19 -0) 📝 `packages/sync-server/src/app-sync.test.ts` (+469 -17) 📝 `packages/sync-server/src/app-sync.ts` (+87 -15) ➕ `upcoming-release-notes/7040.md` (+6 -0) </details> ### 📄 Description _No description provided_ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 23:53:49 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#37091