Project

General

Profile

Actions

Story #13146

closed

[API] Endpoint to get projects shared with me

Added by Peter Amstutz almost 7 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
08/15/2018
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
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/2018

Actions
Task #14060: shared endpointResolvedPeter Amstutz08/15/2018

Actions

Related issues 5 (2 open3 closed)

Related to Arvados - Bug #12990: [FUSE] Access shared/ is inefficientIn ProgressPeter Amstutz

Actions
Related to Arvados - Story #13111: [WebDAV] Support browsing of project hierarchiesResolvedTom Clegg03/27/2018

Actions
Related to Arvados - Story #13218: Support browsing of projects shared with me in WebDAVNew

Actions
Related to Arvados - Feature #14201: [API] Accept "exclude_home_project" flag in groups#contentsResolvedPeter Amstutz10/01/2018

Actions
Related to Arvados Workbench 2 - Support #15238: [Workbench] Change the content inside the owner column from uuid to Projects and user namesResolved

Actions
Actions

Also available in: Atom PDF