移动的调整

newyslclassrooms
cxt 5 years ago
parent 43d124b199
commit d70917fbfc

@ -141,8 +141,7 @@ class CoursesController < ApplicationController
video = @course.course_videos.where(video_id: params[:video_ids]).or(@course.course_videos.where(id: params[:video_ids])).first
user_id = video.user_id || video.video.user_id
tip_exception("您不是课堂管理员或者视频发布者,暂不能移动视频。") unless @user_course_identity < Course::PROFESSOR ||
user_id == current_user.id || current_user.admin_or_business?
tip_exception("您不是课堂管理员或者视频发布者,暂不能移动视频。") unless @user_course_identity < Course::PROFESSOR || user_id == current_user.id
video.update!(course_second_category_id: params[:new_category_id])
normal_status(0, "操作成功")

Loading…
Cancel
Save