Explorar o código

fix: removing user playlists didn't check if user was the owner

Kristian Vos %!s(int64=3) %!d(string=hai) anos
pai
achega
24e39809c2
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      backend/logic/actions/playlists.js

+ 1 - 0
backend/logic/actions/playlists.js

@@ -1370,6 +1370,7 @@ export default {
 				},
 
 				(playlist, next) => {
+					if (playlist.createdBy !== session.userId) return next("You do not own this playlist."); 
 					if (!playlist.isUserModifiable) return next("Playlist cannot be removed.");
 					return next(null, playlist);
 				},