X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/43c411ec1441ee1710dc33389d7451f7414a170f..52bf3c0924da239488fff3ed9907c3478ee44e6b:/apps/workbench/app/models/group.rb diff --git a/apps/workbench/app/models/group.rb b/apps/workbench/app/models/group.rb index dd04c00590..638f6e884a 100644 --- a/apps/workbench/app/models/group.rb +++ b/apps/workbench/app/models/group.rb @@ -1,2 +1,24 @@ class Group < ArvadosBase + def self.goes_in_folders? + true + end + + def contents params={} + res = arvados_api_client.api self.class, "/#{self.uuid}/contents", { + _method: 'GET' + }.merge(params) + ret = ArvadosResourceList.new + ret.results = arvados_api_client.unpack_api_response(res) + ret + end + + def class_for_display + group_class == 'folder' ? 'Folder' : super + end + + def editable? + respond_to?(:writable_by) and + writable_by and + writable_by.index(current_user.uuid) + end end