Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-22 12:02:31 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-22 12:02:31 +0400
commit9de23248d8f3d6464d329b979ccfe98c23eb4aa3 (patch)
treedfdd4a66faf877f1f874f066272818936ce6e819 /lib/tasks/migrate
parent1dd6606161bea762cefe14c7a39f79a8c0b43dd7 (diff)
You should not be able to remove a Group owner
Diffstat (limited to 'lib/tasks/migrate')
-rw-r--r--lib/tasks/migrate/migrate_groups.rake16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/tasks/migrate/migrate_groups.rake b/lib/tasks/migrate/migrate_groups.rake
new file mode 100644
index 00000000000..153172dc90a
--- /dev/null
+++ b/lib/tasks/migrate/migrate_groups.rake
@@ -0,0 +1,16 @@
+desc "GITLAB | Migrate Gropus to match v6.0"
+task migrate_groups: :environment do
+ puts "This will add group owners to group membership"
+ ask_to_continue
+
+ Group.find_each(batch_size: 20) do |group|
+ begin
+ group.send :add_owner
+ print '.'
+ rescue => ex
+ puts ex.message
+ print 'F'
+ end
+ end
+end
+