فهرست منبع

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

Kristian Vos 3 سال پیش
والد
کامیت
24e39809c2
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  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);
 				},