add authorized_keys views and editable fields
[arvados.git] / apps / workbench / app / models / authorized_key.rb
index a56021682cbc953ff145d23acbbef664cf59060c..62ee83238dae697bfaa72b71d3994d3077b86fde 100644 (file)
@@ -1,2 +1,9 @@
 class AuthorizedKey < ArvadosBase
+  def attribute_editable?(attr)
+    if attr.to_s == 'authorized_user'
+      current_user and current_user.is_admin
+    else
+      super(attr)
+    end
+  end
 end