debian-mirror-gitlab/db/fixtures/development/06_teams.rb

22 lines
435 B
Ruby
Raw Normal View History

2014-09-02 18:07:02 +05:30
Gitlab::Seeder.quiet do
Group.all.each do |group|
User.all.sample(4).each do |user|
2015-04-26 12:48:37 +05:30
if group.add_users([user.id], Gitlab::Access.values.sample)
2014-09-02 18:07:02 +05:30
print '.'
else
print 'F'
end
end
end
Project.all.each do |project|
User.all.sample(4).each do |user|
2015-04-26 12:48:37 +05:30
if project.team << [user, Gitlab::Access.values.sample]
2014-09-02 18:07:02 +05:30
print '.'
else
print 'F'
end
end
end
end