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:
@@ -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 %>
|
||||
|
||||
Reference in New Issue
Block a user