Merge branch 'master' into 2209-correct-items-available
[arvados.git] / services / api / db / migrate / 20140402001908_add_system_group.rb
1 class AddSystemGroup < ActiveRecord::Migration
2   include CurrentApiClient
3
4   def up
5     # Make sure the system group exists.
6     system_group
7   end
8
9   def down
10     act_as_system_user do
11       system_group.destroy
12
13       # Destroy the automatically generated links giving system_group
14       # permission on all users.
15       Link.destroy_all(tail_uuid: system_group_uuid, head_kind: 'arvados#user')
16     end
17   end
18 end