Index: C:/rubyworkspace/redmine-trunk/app/models/project.rb =================================================================== --- C:/rubyworkspace/redmine-trunk/app/models/project.rb (revision 128) +++ C:/rubyworkspace/redmine-trunk/app/models/project.rb (working copy) @@ -36,8 +36,8 @@ validates_format_of :name, :with => /^[\w\s\'\-]*$/i # returns 5 last created projects - def self.latest - find(:all, :limit => 5, :order => "created_on DESC") + def self.latest(user) + find(:all, :limit => 5, :include => :users, :conditions => ["users.id = ? or is_public = ?", user.id, true], :order => "projects.created_on DESC") end # Returns an array of all custom fields enabled for project issues