mirror of
https://github.com/immich-app/immich.git
synced 2026-02-12 11:58:15 +03:00
* refactor: access repo interface * feat: access core * fix: allow shared links to add to a shared link * chore: comment out unused code * fix: pr feedback --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
21 lines
748 B
TypeScript
21 lines
748 B
TypeScript
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>;
|
|
};
|
|
}
|