소스 검색

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