From 029e460ee33ef558c19fe90ca71b0badab1e350a Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 12 Feb 2020 11:17:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E5=88=A0=E9=99=A4=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 85f918921..d737ed126 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -112,7 +112,7 @@ class CoursesController < ApplicationController def delete_course_video video = Video.find_by(id: params[:video_id]) tip_exception(404, "找不到资源") if video.blank? - tip_exception(403, "...") if (video.user_id == current_user.id || current_user.admin_or_business?) + tip_exception(403, "...") unless (video.user_id == current_user.id || current_user.admin_or_business?) video.destroy! AliyunVod::Service.delete_video([video.uuid]) rescue nil render_ok