Merge pull request #28209 from overleaf/mj-dropbox-stop-archived-sync

[web] Avoid applying TPDS updates to archived and trashed projects

GitOrigin-RevId: c33bfb1ae5975cd98c81b76713fb99369816b188
This commit is contained in:
Mathias Jakobsen
2025-11-25 09:05:33 +00:00
committed by Copybot
parent 547ae18f73
commit af148bafb3
2 changed files with 54 additions and 5 deletions
@@ -107,7 +107,11 @@ async function findProjectByIdWithRWAccess(userId, projectId) {
for (const projects of [allProjects.owned, allProjects.readAndWrite]) {
for (const project of projects) {
if (project._id.toString() === projectId) {
return project
if (ProjectHelper.isArchivedOrTrashed(project, userId)) {
return null
} else {
return project
}
}
}
}