修改《个人主页出现没权限访问链接》bug

Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
alan 2014-12-22 11:26:21 +08:00
parent 683acfcafc
commit c99af4cb7b
1 changed files with 1 additions and 3 deletions

View File

@ -436,9 +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.homework_for_courses.first.course.visible?(User.current) ||
!User.current.member_of_course?(e.act.homework_for_courses.first.course) || !User.current.admin?)))
((e.act_type == "Bid") && ((!User.current.member_of_course?(e.act.courses.first) || !User.current.admin?)))
}
@activity_count = activity.count
@activity_pages = Paginator.new @activity_count, pre_count, params['page']