Do not blow up on the 'Manage account' page if the db contains an ssh
[arvados.git] / apps / workbench / app / models / authorized_key.rb
index a56021682cbc953ff145d23acbbef664cf59060c..724c996e4a4ef173f432514349921ab249eddf2a 100644 (file)
@@ -1,2 +1,9 @@
 class AuthorizedKey < ArvadosBase
+  def attribute_editable? attr, *args
+    if attr.to_s == 'authorized_user_uuid'
+      current_user and current_user.is_admin
+    else
+      super
+    end
+  end
 end