修复首页报错
This commit is contained in:
parent
fea7bd6ad1
commit
c6788e2f40
|
@ -447,7 +447,7 @@ class UsersController < ApplicationController
|
|||
activity = activity.reject { |e|
|
||||
!User.current.admin? &&
|
||||
(((e.act_type == "Issue") && !e.act.project.visible?(User.current)) ||
|
||||
(e.act_type == "Bid" && e.act.courses.first.is_public == 0 && !User.current.member_of_course?(e.act.courses.first)) ||
|
||||
(e.act_type == "Bid" && !e.act.courses.first.nil? && e.act.courses.first.is_public == 0 && !User.current.member_of_course?(e.act.courses.first)) ||
|
||||
(e.act_type == "Journal" && e.act.respond_to?("Project") && !e.act.project.visible?(User.current)) ||
|
||||
(e.act_type == "News" && ((!e.act.project.nil? && !e.act.project.visible?(User.current)) || (!e.act.course.nil? && e.act.course.is_public == 0 && !User.current.member_of_course?(e.act.course)))) ||
|
||||
(e.act_type == "Message" && !e.act.board.nil? && ((!e.act.board.project.nil? && !e.act.board.project.visible?(User.current)) || (!e.act.board.course.nil? && e.act.board.course.is_public == 0 && !User.current.member_of_course?(e.act.board.course)))))
|
||||
|
|
|
@ -119,7 +119,7 @@ module Redmine
|
|||
#else
|
||||
# e += [cur_obj]
|
||||
#end
|
||||
if cur_obj.project != nil && cur_obj.project.project_status != nil && cur_obj.project.is_public == true
|
||||
if cur_obj.project.respond_to?("Project") && cur_obj.project != nil && cur_obj.project.project_status != nil && cur_obj.project.is_public == true
|
||||
e += [cur_obj]
|
||||
#else
|
||||
# e += [cur_obj]
|
||||
|
|
Loading…
Reference in New Issue