X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/467b636f7d1b34f7695f55af972ae90132fc8063..35035ce1c0e71990a30f6b1cc2aad961d06774cd:/apps/workbench/app/models/user.rb diff --git a/apps/workbench/app/models/user.rb b/apps/workbench/app/models/user.rb index 3b5b3083fc..1f102dbf17 100644 --- a/apps/workbench/app/models/user.rb +++ b/apps/workbench/app/models/user.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class User < ArvadosBase def initialize(*args) super(*args) @@ -6,7 +10,7 @@ class User < ArvadosBase end def self.current - res = arvados_api_client.api self, '/current' + res = arvados_api_client.api self, '/current', nil, {}, false arvados_api_client.unpack_api_response(res) end @@ -63,4 +67,8 @@ class User < ArvadosBase def deletable? false end + + def self.creatable? + current_user and current_user.is_admin + end end