19139: Fixes bug by always setting owner_uuid to the system root user's UUID.
[arvados.git] / services / api / app / models / user.rb
index d39695e27b19c82244c35e800db6107bf19cb950..1662278cc3edc0c4b9c681d51b1696c195b27a98 100644 (file)
@@ -350,6 +350,11 @@ SELECT target_uuid, perm_level
     self.save!
   end
 
+  # Called from ArvadosModel
+  def set_default_owner
+    self.owner_uuid = system_user_uuid
+  end
+
   def must_unsetup_to_deactivate
     if !self.new_record? &&
        self.uuid[0..4] == Rails.configuration.Login.LoginCluster &&