Merge branch 'master' into 1970-folder-view
[arvados.git] / apps / workbench / app / models / group.rb
1 class Group < ArvadosBase
2   def contents params={}
3     res = $arvados_api_client.api self.class, "/#{self.uuid}/contents", {
4       _method: 'GET'
5     }.merge(params)
6     ret = ArvadosResourceList.new
7     ret.results = $arvados_api_client.unpack_api_response(res)
8     ret
9   end
10
11   def class_for_display
12     group_class == 'folder' ? 'Folder' : super
13   end
14
15   def editable?
16     respond_to?(:writable_by) and
17       writable_by and
18       writable_by.index(current_user.uuid)
19   end
20 end