1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-22 19:52:46 +01:00
immich/server/src/domain/access/access.repository.ts

25 lines
838 B
TypeScript
Raw Normal View History

export const IAccessRepository = 'IAccessRepository';
export interface IAccessRepository {
asset: {
hasOwnerAccess(userId: string, assetId: string): Promise<boolean>;
hasAlbumAccess(userId: string, assetId: string): Promise<boolean>;
hasPartnerAccess(userId: string, assetId: string): Promise<boolean>;
hasSharedLinkAccess(sharedLinkId: string, assetId: string): Promise<boolean>;
};
album: {
hasOwnerAccess(userId: string, albumId: string): Promise<boolean>;
hasSharedAlbumAccess(userId: string, albumId: string): Promise<boolean>;
hasSharedLinkAccess(sharedLinkId: string, albumId: string): Promise<boolean>;
};
library: {
hasPartnerAccess(userId: string, partnerId: string): Promise<boolean>;
};
person: {
hasOwnerAccess(userId: string, personId: string): Promise<boolean>;
};
}