Feature #14201

[API] Accept "exclude_home_project" flag in groups#contents

Added by Tom Clegg 12 months ago. Updated 9 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
Start date:
10/01/2018
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
1.0
Release:
Release relationship:
Auto

Description

If a truthy exclude_home_project query parameter is given,
  • include only items that are not otherwise reachable by the current user via project tree -- i.e., items whose parents are not visible to the current user, or are users other than the current user, or are non-project groups (see #13146)
  • return a "bad request" error if parent/owner uuid is also given

Subtasks

Task #14238: Review 14201-exclude-home-projectResolvedLucas Di Pentima


Related issues

Related to Arvados - Story #13146: [API] Endpoint to get projects shared with meResolved08/15/2018

Associated revisions

Revision 2130de30
Added by Peter Amstutz 11 months ago

Merge branch '14201-exclude-home-project' closes #14201

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <>

History

#1 Updated by Tom Clegg 12 months ago

  • Description updated (diff)

#2 Updated by Tom Clegg 12 months ago

  • Related to Story #13146: [API] Endpoint to get projects shared with me added

#3 Updated by Tom Morris 12 months ago

  • Target version set to To Be Groomed
  • Story points set to 1.0

#4 Updated by Tom Clegg 12 months ago

  • Description updated (diff)

#5 Updated by Tom Clegg 12 months ago

  • Description updated (diff)

#6 Updated by Tom Morris 11 months ago

  • Target version changed from To Be Groomed to 2018-10-03 Sprint

#7 Updated by Lucas Di Pentima 11 months ago

  • Assigned To set to Lucas Di Pentima

#8 Updated by Tom Clegg 11 months ago

  • Subject changed from [API] Accept "shared with me" flag in groups#contents to [API] Accept "exclude_home_project" flag in groups#contents
  • Description updated (diff)

#9 Updated by Peter Amstutz 11 months ago

  • Status changed from New to In Progress
  • Assigned To changed from Lucas Di Pentima to Peter Amstutz

#10 Updated by Peter Amstutz 11 months ago

14201-exclude-home-project @ 15f312dfec5cf19c2c71508b2ed7a9d65758eeb0

  • Added "exclude_home_project" to "contents" endpoint
  • Updated documentation
  • Added tests

https://ci.curoverse.com/view/Developer/job/developer-run-tests/909/

#11 Updated by Lucas Di Pentima 11 months ago

A couple of comments:

  • On file services/api/app/controllers/arvados/v1/groups_controller.rb, lines 115, 266: In case owners var contain lots of repeated uuids, would it be convenient to get the de-duplicated version before passing it to que query? (I’m not sure if Active Record already does this)
  • Should exclude_home() be a protected method?
  • Fuse tests seem to have halted on test_safer_realpath, don't know if it's related to this update.

#12 Updated by Peter Amstutz 11 months ago

Lucas Di Pentima wrote:

A couple of comments:

  • On file services/api/app/controllers/arvados/v1/groups_controller.rb, lines 115, 266: In case owners var contain lots of repeated uuids, would it be convenient to get the de-duplicated version before passing it to que query? (I’m not sure if Active Record already does this)

Now converts to Set() (which will deduplicate entries) and then back to Array.

  • Should exclude_home() be a protected method?

Fixed.

  • Fuse tests seem to have halted on test_safer_realpath, don't know if it's related to this update.

Seems unlikely but anything is possible, let's see what happens on the next run.

14201-exclude-home-project @ 8cfec0701cd01994502b53dbaf73cd86a24ff72e

https://ci.curoverse.com/view/Developer/job/developer-run-tests/911/

#13 Updated by Lucas Di Pentima 11 months ago

This LGTM, please merge.

#14 Updated by Peter Amstutz 11 months ago

  • Status changed from In Progress to Resolved

#15 Updated by Tom Morris 9 months ago

  • Release set to 14

Also available in: Atom PDF