mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix(web,server): disable partner's archive access (#3695)
This commit is contained in:
parent
efc7fdb669
commit
74da15e20d
3 changed files with 9 additions and 1 deletions
|
|
@ -19,6 +19,8 @@ export enum Permission {
|
|||
ALBUM_SHARE = 'album.share',
|
||||
ALBUM_DOWNLOAD = 'album.download',
|
||||
|
||||
ARCHIVE_READ = 'archive.read',
|
||||
|
||||
LIBRARY_READ = 'library.read',
|
||||
LIBRARY_DOWNLOAD = 'library.download',
|
||||
}
|
||||
|
|
@ -156,6 +158,9 @@ export class AccessCore {
|
|||
case Permission.ALBUM_REMOVE_ASSET:
|
||||
return this.repository.album.hasOwnerAccess(authUser.id, id);
|
||||
|
||||
case Permission.ARCHIVE_READ:
|
||||
return authUser.id === id;
|
||||
|
||||
case Permission.LIBRARY_READ:
|
||||
return authUser.id === id || (await this.repository.library.hasPartnerAccess(authUser.id, id));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue