This commit is contained in:
xianbo 2013-10-12 10:08:45 +08:00
parent fd14457446
commit d3f46adc34
1 changed files with 1 additions and 1 deletions

View File

@ -373,7 +373,7 @@ class BidsController < ApplicationController
#by xianbo #by xianbo
def homework_destroy def homework_destroy
@bid_to_destroy = Bid.find params[:course_id] @bid_to_destroy = Bid.find params[:course_id]
(render_403; return false) unless User.current.admin?||User.current.id==bid.author_id (render_403; return false) unless User.current.admin?||User.current.id==@bid_to_destroy.author_id
@bid_to_destroy.destroy @bid_to_destroy.destroy
respond_to do |format| respond_to do |format|
format.html { redirect_to :back } format.html { redirect_to :back }