mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
feat: sharing permissions
This commit is contained in:
@@ -28,6 +28,8 @@ export class AlbumUserFactory {
|
||||
createdAt: newDate(),
|
||||
updateId: newUuidV7(),
|
||||
updatedAt: newDate(),
|
||||
permissions: [],
|
||||
inTimeline: false,
|
||||
...dto,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ export class PartnerFactory {
|
||||
sharedWithId,
|
||||
updatedAt: newDate(),
|
||||
updateId: newUuidV7(),
|
||||
permissions: [],
|
||||
...dto,
|
||||
})
|
||||
.sharedBy({ id: sharedById })
|
||||
|
||||
@@ -35,6 +35,7 @@ export class UserFactory {
|
||||
status: UserStatus.Active,
|
||||
profileChangedAt: newDate(),
|
||||
updateId: newUuidV7(),
|
||||
trustedGroupId: newUuid(),
|
||||
...dto,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ export const newAccessRepositoryMock = (): IAccessRepositoryMock => {
|
||||
checkAlbumAccess: vitest.fn().mockResolvedValue(new Set()),
|
||||
checkPartnerAccess: vitest.fn().mockResolvedValue(new Set()),
|
||||
checkSharedLinkAccess: vitest.fn().mockResolvedValue(new Set()),
|
||||
checkSharedAccess: vitest.fn().mockResolvedValue(new Set()),
|
||||
},
|
||||
|
||||
album: {
|
||||
@@ -48,6 +49,8 @@ export const newAccessRepositoryMock = (): IAccessRepositoryMock => {
|
||||
person: {
|
||||
checkFaceOwnerAccess: vitest.fn().mockResolvedValue(new Set()),
|
||||
checkOwnerAccess: vitest.fn().mockResolvedValue(new Set()),
|
||||
checkSharedAccess: vitest.fn().mockResolvedValue(new Set()),
|
||||
checkSharedFaceAccess: vitest.fn().mockResolvedValue(new Set()),
|
||||
},
|
||||
|
||||
partner: {
|
||||
|
||||
Reference in New Issue
Block a user