files pemission

dev_forum
jasder 5 years ago
parent fa65d94dbd
commit 77b6b52cff

@ -200,7 +200,7 @@ class FilesController < ApplicationController
# 资源设置 # 资源设置
def update def update
return normal_status(403, "您没有权限进行该操作") unless current_user.teacher_or_admin?(@course) || @file.author == current_user return normal_status(403, "您没有权限进行该操作") if current_user.course_identity(@course) >= 5 && @file.author != current_user
is_unified_setting = params[:is_unified_setting] is_unified_setting = params[:is_unified_setting]
publish_time = params[:publish_time] publish_time = params[:publish_time]

Loading…
Cancel
Save