dev_forum
jasder 5 years ago
parent 8f359dd9a1
commit a820dd0a67

@ -45,7 +45,7 @@ class CommonsController < ApplicationController
code = code =
case params[:object_type].strip case params[:object_type].strip
when 'message' when 'message'
if current_user.course_identity(@object.board.course) >= 5 || @object.author != current_user if current_user.course_identity(@object.board.course) >= 5 && @object.author != current_user
403 403
else else
200 200
@ -53,7 +53,7 @@ class CommonsController < ApplicationController
else else
current_user.admin? ? 200 : 403 current_user.admin? ? 200 : 403
end end
return normal_status(403, "你没有权限操作!") if code == 403 return normal_status(code, "你没有权限操作!") if code == 403
end end
def action(flag) def action(flag)

Loading…
Cancel
Save