[ARVADOS] updated: 6566142db3e00a866559402a10991c2ded1e74b8

git at public.curoverse.com git at public.curoverse.com
Tue Apr 1 21:29:27 EDT 2014


Summary of changes:
 .../db/migrate/20140402001908_add_system_group.rb  |   18 ++++++++++++++++++
 .../20140402001908_add_system_user_group.rb        |   12 ------------
 2 files changed, 18 insertions(+), 12 deletions(-)
 create mode 100644 services/api/db/migrate/20140402001908_add_system_group.rb
 delete mode 100644 services/api/db/migrate/20140402001908_add_system_user_group.rb

       via  6566142db3e00a866559402a10991c2ded1e74b8 (commit)
      from  a97c22ce97e867813d27dbace041de166bb26c09 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 6566142db3e00a866559402a10991c2ded1e74b8
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Apr 1 21:27:37 2014 -0400

    Fix down-migration: delete the system_group and automatically
    generated links, and rename the migration.

diff --git a/services/api/db/migrate/20140402001908_add_system_group.rb b/services/api/db/migrate/20140402001908_add_system_group.rb
new file mode 100644
index 0000000..3bae7ea
--- /dev/null
+++ b/services/api/db/migrate/20140402001908_add_system_group.rb
@@ -0,0 +1,18 @@
+class AddSystemGroup < ActiveRecord::Migration
+  include CurrentApiClient
+
+  def up
+    # Make sure the system group exists.
+    system_group
+  end
+
+  def down
+    act_as_system_user do
+      system_group.destroy
+
+      # Destroy the automatically generated links giving system_group
+      # permission on all users.
+      Link.destroy_all(tail_uuid: system_group_uuid, head_kind: 'arvados#user')
+    end
+  end
+end
diff --git a/services/api/db/migrate/20140402001908_add_system_user_group.rb b/services/api/db/migrate/20140402001908_add_system_user_group.rb
deleted file mode 100644
index 4eea5ec..0000000
--- a/services/api/db/migrate/20140402001908_add_system_user_group.rb
+++ /dev/null
@@ -1,12 +0,0 @@
-class AddSystemUserGroup < ActiveRecord::Migration
-  include CurrentApiClient
-
-  def up
-    # Make sure the system group exists.
-    system_group
-  end
-
-  def down
-    # The system group does no harm if we don't delete it.
-  end
-end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list