diff --git a/server/src/domain/access/access.core.ts b/server/src/domain/access/access.core.ts index 8602701072..7063cb49a2 100644 --- a/server/src/domain/access/access.core.ts +++ b/server/src/domain/access/access.core.ts @@ -262,16 +262,25 @@ export class AccessCore { } case Permission.LIBRARY_READ: { + if (auth.user.isAdmin) { + return new Set(ids); + } const isOwner = await this.repository.library.checkOwnerAccess(auth.user.id, ids); const isPartner = await this.repository.library.checkPartnerAccess(auth.user.id, setDifference(ids, isOwner)); return setUnion(isOwner, isPartner); } case Permission.LIBRARY_UPDATE: { + if (auth.user.isAdmin) { + return new Set(ids); + } return await this.repository.library.checkOwnerAccess(auth.user.id, ids); } case Permission.LIBRARY_DELETE: { + if (auth.user.isAdmin) { + return new Set(ids); + } return await this.repository.library.checkOwnerAccess(auth.user.id, ids); }