Project

General

Profile

Actions

Idea #13146

closed

[API] Endpoint to get projects shared with me

Added by Peter Amstutz about 6 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Story points:
3.0
Release:
Release relationship:
Auto

Description

To get "projects shared with me" efficiently requires a new API endpoint. The way arv-mount currently determines what to list in "shared" currently requires looking at all projects and finding the ones where owner_uuid is not another project which is visible to us (meaning: users, non-project groups, or shared subprojects where the parent is not visible). This is expensive to compute on
the client, but can probably be accomplished with a single query on the API server.

Proposed endpoint: /arvados/v1/groups/shared

Return in "items" a list of toplevel projects and collections which are shared with me. Toplevel projects are ones which are either owned by a user, owned by a non-project group, or owned by a group which the user cannot read.

Support "includes" to return the set of owner objects as well (users, groups).

Possible query (abbreviated):

  • select groups that are readable by current user AND
    • the owner_uuid is a user (not a group) OR
    • the owner_uuid is a group is not a project or is not readable by the current user
select uuid from groups where 
  exists(select 1 from materialized_permission_view where user_uuid='2tlax-tpzed-51vcbmac4uv6bpb' and target_uuid=groups.uuid) and 
  (groups.owner_uuid in (select uuid from users) or 
    not exists(select 1 from materialized_permission_view where user_uuid='2tlax-tpzed-51vcbmac4uv6bpb' and target_uuid=groups.owner_uuid)) and 
  owner_uuid != '2tlax-tpzed-51vcbmac4uv6bpb';

Subtasks 2 (0 open2 closed)

Task #13950: Review 13146-shared-railsResolvedPeter Amstutz08/16/2018Actions
Task #14060: shared endpointResolvedPeter Amstutz08/15/2018Actions

Related issues

Related to Arvados - Bug #12990: [FUSE] Access shared/ is inefficientResolvedPeter AmstutzActions
Related to Arvados - Idea #13111: [WebDAV] Support browsing of project hierarchiesResolvedTom Clegg03/27/2018Actions
Related to Arvados - Idea #13218: Support browsing of projects shared with me in WebDAVNewActions
Related to Arvados - Feature #14201: [API] Accept "exclude_home_project" flag in groups#contentsResolvedPeter Amstutz10/01/2018Actions
Related to Arvados Workbench 2 - Support #15238: [Workbench] Change the content inside the owner column from uuid to Projects and user namesResolvedActions
Actions

Also available in: Atom PDF