Merge branch '2107-update-documentation'
[arvados.git] / apps / workbench / app / models / collection.rb
index ee3a7883e3e0dab39173069340078fe401fd07fc..6bc55bde3d21199fda4c31fa3143800d9b03c026 100644 (file)
@@ -1,4 +1,5 @@
-class Collection < OrvosBase
+class Collection < ArvadosBase
+
   def total_bytes
     if files
       tot = 0
@@ -8,4 +9,21 @@ class Collection < OrvosBase
       tot
     end
   end
+
+  def attribute_editable?(attr)
+    false
+  end
+
+  def self.creatable?
+    false
+  end
+
+  def provenance
+    $arvados_api_client.api "collections/#{self.uuid}/", "provenance"
+  end
+
+  def used_by
+    $arvados_api_client.api "collections/#{self.uuid}/", "used_by"
+  end
+
 end