X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/44c93373e97da98645d41ae8f09c6eef6788bb26..9551b59d3aab67f77240b90bbb550faec6b2a7d9:/services/api/app/models/user.rb diff --git a/services/api/app/models/user.rb b/services/api/app/models/user.rb index bbb2378f5c..4449466135 100644 --- a/services/api/app/models/user.rb +++ b/services/api/app/models/user.rb @@ -72,6 +72,8 @@ class User < ArvadosModel t.add :is_invited t.add :prefs t.add :writable_by + t.add :can_write + t.add :can_manage end ALL_PERMISSIONS = {read: true, write: true, manage: true} @@ -582,6 +584,13 @@ SELECT target_uuid, perm_level protected + def self.attributes_required_columns + super.merge( + 'can_write' => ['owner_uuid', 'uuid'], + 'can_manage' => ['owner_uuid', 'uuid'], + ) + end + def change_all_uuid_refs(old_uuid:, new_uuid:) ActiveRecord::Base.descendants.reject(&:abstract_class?).each do |klass| klass.columns.each do |col|