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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user