Merge branch '2061-update-docs'
[arvados.git] / services / api / app / models / link.rb
index b685bb6d75cff206a4d9d6652a4f1c0846f799b9..1d4e13d18618eddb14a98aac80aa60f591b5c58a 100644 (file)
@@ -12,7 +12,7 @@ class Link < ArvadosModel
   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 < ArvadosModel
       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