1 class VirtualMachine < ArvadosModel
4 include CommonApiTemplate
6 has_many(:login_permissions,
7 -> { where("link_class = 'permission' and name = 'can_login'") },
8 foreign_key: :head_uuid,
12 api_accessible :user, extend: :common do |t|
18 def permission_to_create
19 current_user and current_user.is_admin
21 def permission_to_update
22 current_user and current_user.is_admin