feat: allow users to update own albums and curators to update any album

- Users: changed from blanket Forbid to ownership check (can update own albums)
- Curators: changed from ownership check to full access (can update any album)
This commit is contained in:
REDCODE
2026-07-09 23:46:02 +02:00
parent 5a74edd29f
commit 652143d738

View File

@@ -121,14 +121,12 @@ public class AlbumController(
switch (accessLevel) {
case EAccessLevel.User:
// Users can't update albums
return Forbid();
case EAccessLevel.Curator:
// Curators can only update albums they own
if (album.UserOwnerId != uid) return Forbid();
// Users can't update albums they don't own
if(album.UserOwnerId != uid) return Forbid();
break;
// Admins and Curator can update any album
case EAccessLevel.Curator:
case EAccessLevel.Admin:
// Admins can update any album
break;
}