删除毕设选题权限不够

dev_forum
daiao 5 years ago
parent e1864ea2f5
commit 092ececc96

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

Loading…
Cancel
Save