X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d6cc9d6e055974384be446f6da8218ff7da048ae..e8f99cfef7cfbfcf1a1485d69250f24ced3fd609:/services/api/lib/common_api_template.rb diff --git a/services/api/lib/common_api_template.rb b/services/api/lib/common_api_template.rb index d474581ef3..8aac264516 100644 --- a/services/api/lib/common_api_template.rb +++ b/services/api/lib/common_api_template.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + module CommonApiTemplate def self.included(base) base.acts_as_api @@ -16,7 +20,6 @@ module CommonApiTemplate t.add :modified_by_client_uuid t.add :modified_by_user_uuid t.add :modified_at - t.add :updated_at end end @@ -25,7 +28,7 @@ module CommonApiTemplate def as_api_response(template=nil, opts={}) if template.nil? user = opts[:for_user] || current_user - if user.is_admin and self.respond_to? :api_accessible_superuser + if user.andand.is_admin and self.respond_to? :api_accessible_superuser template = :superuser else template = :user