1 class User < ArvadosBase
4 @attribute_sortkey['first_name'] = '050'
5 @attribute_sortkey['last_name'] = '051'
9 res = $arvados_api_client.api self, '/current'
10 $arvados_api_client.unpack_api_response(res)
14 $arvados_system_user ||= begin
15 res = $arvados_api_client.api self, '/system'
16 $arvados_api_client.unpack_api_response(res)
21 res = $arvados_api_client.api self.class, "/#{self.uuid}/owned_items"
22 $arvados_api_client.unpack_api_response(res)
26 (self.first_name || "") + " " + (self.last_name || "")
30 self.private_reload($arvados_api_client.api(self.class,
31 "/#{self.uuid}/activate",
35 def attributes_for_display
36 super.reject { |k,v| %w(owner_uuid default_owner_uuid identity_url prefs).index k }
39 def attribute_editable?(attr)
40 (not (self.uuid.andand.match(/000000000000000$/) and self.is_admin)) and super(attr)
43 def friendly_link_name
44 [self.first_name, self.last_name].compact.join ' '
48 self.private_reload($arvados_api_client.api(self.class,
49 "/#{self.uuid}/unsetup",
54 $arvados_api_client.api(self, "/setup", params)