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 (self.first_name || "") + " " + (self.last_name || "")
25 self.private_reload(arvados_api_client.api(self.class,
26 "/#{self.uuid}/activate",
30 def contents params={}
31 Group.contents params.merge(uuid: self.uuid)
34 def attributes_for_display
35 super.reject { |k,v| %w(owner_uuid default_owner_uuid identity_url prefs).index k }
38 def attribute_editable? attr, *args
39 (not (self.uuid.andand.match(/000000000000000$/) and self.is_admin)) and super
42 def friendly_link_name lookup=nil
43 [self.first_name, self.last_name].compact.join ' '
47 self.private_reload(arvados_api_client.api(self.class,
48 "/#{self.uuid}/unsetup",
53 arvados_api_client.api(self, "/setup", params)
56 def update_profile params
57 self.private_reload(arvados_api_client.api(self.class,
58 "/#{self.uuid}/profile",