X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/19ae770973482257117fe8ded5619c3018c4b60f..dd3172b922a00ffc1530188a7988356f376a067f:/services/api/app/controllers/arvados/v1/user_agreements_controller.rb diff --git a/services/api/app/controllers/arvados/v1/user_agreements_controller.rb b/services/api/app/controllers/arvados/v1/user_agreements_controller.rb index 32adde9507..dc08c6a037 100644 --- a/services/api/app/controllers/arvados/v1/user_agreements_controller.rb +++ b/services/api/app/controllers/arvados/v1/user_agreements_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class Arvados::V1::UserAgreementsController < ApplicationController before_filter :admin_required, except: [:index, :sign, :signatures] skip_before_filter :find_object_by_uuid, only: [:sign, :signatures] @@ -17,7 +21,6 @@ class Arvados::V1::UserAgreementsController < ApplicationController # use this installation. @objects = [] else - current_user_uuid = current_user.uuid act_as_system_user do uuids = Link.where("owner_uuid = ? and link_class = ? and name = ? and tail_uuid = ? and head_uuid like ?", system_user_uuid, @@ -25,7 +28,7 @@ class Arvados::V1::UserAgreementsController < ApplicationController 'require', system_user_uuid, Collection.uuid_like_pattern). - collect &:head_uuid + collect(&:head_uuid) @objects = Collection.where('uuid in (?)', uuids) end end