Load roles when loading project members.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3078 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2009-11-20 13:08:17 +00:00
parent c9bfdc009b
commit d73fb1fab8
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ class Project < ActiveRecord::Base
find(:all, :conditions => {:active => true})
end
end
has_many :members, :include => :user, :conditions => "#{User.table_name}.type='User' AND #{User.table_name}.status=#{User::STATUS_ACTIVE}"
has_many :members, :include => [:user, :roles], :conditions => "#{User.table_name}.type='User' AND #{User.table_name}.status=#{User::STATUS_ACTIVE}"
has_many :member_principals, :class_name => 'Member',
:include => :principal,
:conditions => "#{Principal.table_name}.type='Group' OR (#{Principal.table_name}.type='User' AND #{Principal.table_name}.status=#{User::STATUS_ACTIVE})"