mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor(server): auth delete device (#4720)
* refactor(server): auth delete device * fix: person e2e
This commit is contained in:
parent
ce04e9e07a
commit
603b056512
11 changed files with 76 additions and 20 deletions
|
|
@ -21,6 +21,8 @@ export enum Permission {
|
|||
ALBUM_SHARE = 'album.share',
|
||||
ALBUM_DOWNLOAD = 'album.download',
|
||||
|
||||
AUTH_DEVICE_DELETE = 'authDevice.delete',
|
||||
|
||||
ARCHIVE_READ = 'archive.read',
|
||||
|
||||
TIMELINE_READ = 'timeline.read',
|
||||
|
|
@ -196,6 +198,9 @@ export class AccessCore {
|
|||
case Permission.ARCHIVE_READ:
|
||||
return authUser.id === id;
|
||||
|
||||
case Permission.AUTH_DEVICE_DELETE:
|
||||
return this.repository.authDevice.hasOwnerAccess(authUser.id, id);
|
||||
|
||||
case Permission.TIMELINE_READ:
|
||||
return authUser.id === id || (await this.repository.timeline.hasPartnerAccess(authUser.id, id));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue