fix(web,server): disable partner's archive access (#3695)

This commit is contained in:
Sergey Kondrikov
2023-08-15 19:02:38 +03:00
committed by GitHub
parent efc7fdb669
commit 74da15e20d
3 changed files with 9 additions and 1 deletions

View File

@@ -148,6 +148,9 @@ export class AssetService {
if (dto.albumId) {
await this.access.requirePermission(authUser, Permission.ALBUM_READ, [dto.albumId]);
} else if (dto.userId) {
if (dto.isArchived !== false) {
await this.access.requirePermission(authUser, Permission.ARCHIVE_READ, [dto.userId]);
}
await this.access.requirePermission(authUser, Permission.LIBRARY_READ, [dto.userId]);
} else {
dto.userId = authUser.id;