Merge branch 'master' into 13823-bionic
[arvados.git] / apps / workbench / app / models / authorized_key.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class AuthorizedKey < ArvadosBase
6   def attribute_editable?(attr, ever=nil)
7     if (attr.to_s == 'authorized_user_uuid') and (not ever)
8       current_user.andand.is_admin
9     else
10       super
11     end
12   end
13
14   def self.creatable?
15     false
16   end
17 end