From 44e184454c5cdb90be154a9ae42ad7140e2e337e Mon Sep 17 00:00:00 2001 From: An Phan Date: Sat, 4 Jun 2016 21:29:45 +0800 Subject: [PATCH] Authorize playlist before downloading --- app/Http/Controllers/API/Download/PlaylistController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Http/Controllers/API/Download/PlaylistController.php b/app/Http/Controllers/API/Download/PlaylistController.php index 6b948cc8..31e1ba48 100644 --- a/app/Http/Controllers/API/Download/PlaylistController.php +++ b/app/Http/Controllers/API/Download/PlaylistController.php @@ -18,6 +18,8 @@ class PlaylistController extends Controller */ public function download(Request $request, Playlist $playlist) { + $this->authorize('owner', $playlist); + return response()->download(Download::from($playlist)); } }