diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 410818fdb..8183ed7ad 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -436,7 +436,7 @@ class UsersController < ApplicationController activity = activity.reject { |e| ((e.act_type=="Issue") && ( !e.act.visible?(User.current))) || ((e.act_type == "Journal") && (!e.act.project.visible?(User.current))) || - ((e.act_type == "Bid") && (e.act.homework_for_courses.count > 0 && + ((e.act_type == "Bid") && (e.act.courses.first && (!e.act.homework_for_courses.first.course.visible?(User.current) || !User.current.member_of_course?(e.act.homework_for_courses.first.course) || !User.current.admin?))) } diff --git a/db/schema.rb b/db/schema.rb index f12d6ad0a..a75c6eb29 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20141201085218) do +ActiveRecord::Schema.define(:version => 20141210070327) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false