fix(server): tighten asset visibility (#18699)

* tighten visibility

* update sql

* elevated access util function

* fix potential sync issue

* include in user stats

* include hidden assets in size usage

* filter visibility in search duplicates query

* stack visibility
This commit is contained in:
Mert
2025-06-02 10:33:08 -04:00
committed by GitHub
parent b5c3a675b2
commit fa22e865a4
21 changed files with 132 additions and 107 deletions
+3 -3
View File
@@ -186,8 +186,8 @@ from
inner join "smart_search" on "assets"."id" = "smart_search"."assetId"
inner join "asset_job_status" as "job_status" on "job_status"."assetId" = "assets"."id"
where
"assets"."visibility" != $1
and "assets"."deletedAt" is null
"assets"."deletedAt" is null
and "assets"."visibility" in ('archive', 'timeline')
and "job_status"."duplicatesDetectedAt" is null
-- AssetJobRepository.streamForEncodeClip
@@ -349,7 +349,7 @@ from
"assets" as "stacked"
where
"stacked"."deletedAt" is not null
and "stacked"."visibility" != $1
and "stacked"."visibility" = $1
and "stacked"."stackId" = "asset_stack"."id"
group by
"asset_stack"."id"