Ver Fonte

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

Kristian Vos há 3 anos atrás
pai
commit
24e39809c2
1 ficheiros alterados com 1 adições e 0 exclusões
  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);
 				},