Merge branch '2061-update-docs'
[arvados.git] / services / api / app / models / link.rb
index 5ca5f36004273d8411fcdd5ea44ce3a0d32f40b3..1d4e13d18618eddb14a98aac80aa60f591b5c58a 100644 (file)
@@ -1,4 +1,4 @@
-class Link < OrvosModel
+class Link < ArvadosModel
   include AssignUuid
   include KindAndEtag
   include CommonApiTemplate
@@ -12,7 +12,7 @@ class Link < OrvosModel
   attr_accessor :head
   attr_accessor :tail
 
-  api_accessible :superuser, :extend => :common do |t|
+  api_accessible :user, extend: :common do |t|
     t.add :tail_kind
     t.add :tail_uuid
     t.add :link_class
@@ -47,7 +47,7 @@ class Link < OrvosModel
       where('uuid=?',head_uuid).
       first
     if head_obj
-      return true if head_obj.owner == current_user.uuid
+      return true if head_obj.owner_uuid == current_user.uuid
     end
 
     # Users with "can_grant" permission on an object can grant