瀏覽代碼

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);
 				},