Improving link names
[arvados.git] / apps / workbench / app / models / virtual_machine.rb
1 class VirtualMachine < ArvadosBase
2   attr_accessor :current_user_logins
3   def self.creatable?
4     current_user.andand.is_admin
5   end
6   def attributes_for_display
7     logger.debug super.append ['current_user_logins', @current_user_logins]
8     super.append ['current_user_logins', @current_user_logins]
9   end
10   def attribute_editable?(attr)
11     attr != 'current_user_logins' and super
12   end
13   def self.attribute_info
14     merger = ->(k,a,b) { a.merge(b, &merger) }
15     merger [nil,
16             {current_user_logins: {column_heading: "logins", type: 'array'}},
17             super]
18   end
19 end