1 class VirtualMachine < ArvadosModel
4 include CommonApiTemplate
6 has_many :login_permissions, :foreign_key => :head_uuid, :class_name => 'Link', :primary_key => :uuid, :conditions => "link_class = 'permission' and name = 'can_login'"
8 api_accessible :user, extend: :common do |t|
14 def permission_to_create
15 current_user and current_user.is_admin
17 def permission_to_update
18 current_user and current_user.is_admin