rename and separate ALBUM_WRITE as ADD_ASSET and REMOVE_ASSET

This commit is contained in:
mgabor
2024-04-21 18:19:27 +02:00
parent 6b075c21b6
commit 9fc61032c3
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -21,9 +21,9 @@ export enum Permission {
// ALBUM_CREATE = 'album.create',
ALBUM_READ = 'album.read',
ALBUM_WRITE = 'album.write',
ALBUM_UPDATE = 'album.update',
ALBUM_DELETE = 'album.delete',
ALBUM_ADD_ASSET = 'album.addAsset',
ALBUM_REMOVE_ASSET = 'album.removeAsset',
ALBUM_SHARE = 'album.share',
ALBUM_DOWNLOAD = 'album.download',
@@ -144,7 +144,7 @@ export class AccessCore {
: new Set();
}
case Permission.ALBUM_WRITE: {
case Permission.ALBUM_ADD_ASSET: {
return sharedLink.allowUpload
? await this.repository.album.checkSharedLinkAccess(sharedLinkId, ids)
: new Set();
@@ -231,7 +231,7 @@ export class AccessCore {
return setUnion(isOwner, isShared);
}
case Permission.ALBUM_WRITE: {
case Permission.ALBUM_ADD_ASSET: {
const isOwner = await this.repository.album.checkOwnerAccess(auth.user.id, ids);
const isShared = await this.repository.album.checkSharedAlbumAccess(
auth.user.id,