删除毕设选题权限不够

dev_forum
daiao 5 years ago
parent e1864ea2f5
commit 092ececc96

@ -44,8 +44,8 @@ class CommonsController < ApplicationController
def validate_power def validate_power
code = code =
case params[:object_type].strip case params[:object_type].strip
when 'message' when 'message', 'journals_for_message'
if current_user.course_identity(@object.board.course) >= 5 && @object.author != current_user if current_user.course_identity(@object.board.course) >= Course::STUDENT && @object.author != current_user
403 403
else else
200 200

Loading…
Cancel
Save