Fixed that 'My page' blocks may display issues that the user is no longer allowed to view (#2590).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2322 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-01-27 18:19:27 +00:00
parent 837f074346
commit cd55529eaa
4 changed files with 9 additions and 6 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
<h3><%=l(:label_watched_issues)%></h3>
<% watched_issues = Issue.find(:all,
<% watched_issues = Issue.visible.find(:all,
:include => [:status, :project, :tracker, :watchers],
:limit => 10,
:conditions => ["#{Watcher.table_name}.user_id = ? AND #{Project.table_name}.status=#{Project::STATUS_ACTIVE}", user.id],
:conditions => ["#{Watcher.table_name}.user_id = ?", user.id],
:order => "#{Issue.table_name}.updated_on DESC") %>
<%= render :partial => 'issues/list_simple', :locals => { :issues => watched_issues } %>
<% if watched_issues.length > 0 %>