remove "add a new VM" button from non-admin VM index page
authorTom Clegg <tom@clinicalfuture.com>
Fri, 28 Jun 2013 15:34:54 +0000 (11:34 -0400)
committerTom Clegg <tom@clinicalfuture.com>
Fri, 28 Jun 2013 15:34:54 +0000 (11:34 -0400)
apps/workbench/app/models/virtual_machine.rb

index a6b845c4e7405016927ef0f0130fc8e5ae12a5b4..61b3b6b36173703a8a554b9e4083773dc0015788 100644 (file)
@@ -1,2 +1,5 @@
 class VirtualMachine < ArvadosBase
+  def self.creatable?
+    current_user.andand.is_admin
+  end
 end