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:
@@ -80,6 +80,7 @@ select
|
||||
where
|
||||
"albums_assets_assets"."albumsId" = "albums"."id"
|
||||
and "assets"."deletedAt" is null
|
||||
and "assets"."visibility" in ('archive', 'timeline')
|
||||
order by
|
||||
"assets"."fileCreatedAt" desc
|
||||
) as "asset"
|
||||
@@ -178,7 +179,8 @@ from
|
||||
"assets"
|
||||
inner join "albums_assets_assets" as "album_assets" on "album_assets"."assetsId" = "assets"."id"
|
||||
where
|
||||
"album_assets"."albumsId" in ($1)
|
||||
"assets"."visibility" in ('archive', 'timeline')
|
||||
and "album_assets"."albumsId" in ($1)
|
||||
and "assets"."deletedAt" is null
|
||||
group by
|
||||
"album_assets"."albumsId"
|
||||
|
||||
Reference in New Issue
Block a user