gitlab-org--gitlab-foss/db/fixtures/development/06_teams.rb
2013-06-20 13:14:23 +03:00

23 lines
504 B
Ruby

ActiveRecord::Base.observers.disable :all
Gitlab::Seeder.quiet do
Group.all.each do |group|
User.all.sample(4).each do |user|
if group.add_users([user.id], UsersGroup.group_access_roles.values.sample)
print '.'
else
print 'F'
end
end
end
Project.all.each do |project|
User.all.sample(4).each do |user|
if project.team << [user, UsersProject.access_roles.values.sample]
print '.'
else
print 'F'
end
end
end
end