Improve API server's git rev-list calls.
[arvados.git] / apps / workbench / app / models / group.rb
1 class Group < ArvadosBase
2   def self.goes_in_projects?
3     true
4   end
5
6   def contents params={}
7     res = arvados_api_client.api self.class, "/#{self.uuid}/contents", {
8       _method: 'GET'
9     }.merge(params)
10     ret = ArvadosResourceList.new
11     ret.results = arvados_api_client.unpack_api_response(res)
12     ret
13   end
14
15   def class_for_display
16     group_class.in?(['folder', 'project']) ? 'Project' : super
17   end
18
19   def editable?
20     respond_to?(:writable_by) and
21       writable_by and
22       writable_by.index(current_user.uuid)
23   end
24 end