X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/520d80f58ab4358dfce0233fe6880794c819760c..52bf3c0924da239488fff3ed9907c3478ee44e6b:/apps/workbench/app/models/group.rb?ds=sidebyside diff --git a/apps/workbench/app/models/group.rb b/apps/workbench/app/models/group.rb index 0004c88474..638f6e884a 100644 --- a/apps/workbench/app/models/group.rb +++ b/apps/workbench/app/models/group.rb @@ -1,10 +1,24 @@ class Group < ArvadosBase - def owned_items params={} - res = $arvados_api_client.api self.class, "/#{self.uuid}/owned_items", { + 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.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