2411: Add copyright notices to everything.
[arvados.git] / services / api / app / controllers / arvados / v1 / links_controller.rb
index 798217dc0cfef7aaea385a67ede5fae198ce6e41..862582aa9ce65fcbcf4a73d8b309b19cf3749556 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 class Arvados::V1::LinksController < ApplicationController
 
   def check_uuid_kind uuid, kind
@@ -20,7 +24,7 @@ class Arvados::V1::LinksController < ApplicationController
   end
 
   def get_permissions
-    if current_user.can?(manage: @object)
+    if current_user.andand.can?(manage: @object)
       # find all links and return them
       @objects = Link.where(link_class: "permission",
                             head_uuid: params[:uuid])