mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix(server): partner can view archived assets (#9750)
* fix(server): partner can view archived assets * update sql queries
This commit is contained in:
parent
9e71256191
commit
8a7b0f66a4
4 changed files with 36 additions and 0 deletions
|
|
@ -153,6 +153,7 @@ FROM
|
|||
AND ("asset"."deletedAt" IS NULL)
|
||||
WHERE
|
||||
"partner"."sharedWithId" = $1
|
||||
AND "asset"."isArchived" = false
|
||||
AND "asset"."id" IN ($2)
|
||||
|
||||
-- AccessRepository.asset.checkSharedLinkAccess
|
||||
|
|
|
|||
|
|
@ -240,6 +240,7 @@ class AssetAccess implements IAssetAccess {
|
|||
.innerJoin('sharedBy.assets', 'asset')
|
||||
.select('asset.id', 'assetId')
|
||||
.where('partner.sharedWithId = :userId', { userId })
|
||||
.andWhere('asset.isArchived = false')
|
||||
.andWhere('asset.id IN (:...assetIds)', { assetIds: [...assetIds] })
|
||||
.getRawMany()
|
||||
.then((rows) => new Set(rows.map((row) => row.assetId)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue