Details
-
Type: Task
-
Status: Closed (View Workflow)
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Story Points:2
-
Epic Link:
-
Sprint:Fall 7 2021 Nov 8 - Nov 24
Description
Situation: There are several issues surrounding the user-permissions endpoint in Terrain.
The user-permissions endpoint only allows a user to check permissions on files they own. If a user does not own a file (i.e. if it is a community or shared file), then we cannot use the user-permissions endpoint to determine if the file is public.
The workaround to the user-permissions endpoint issue above was to use the search endpoint, which returns the user permissions for a file. We use the search endpoint for community/shared data, as they contain data not owned by the user.
Unfortunately, the CyVerse data store takes a significant amount of time (up to several days) to index new files that have been added or created by a user. This means these new files do not immediately appear in the search endpoint results.
Altogether, this creates an edge case where a community/shared file that was recently made public may not appear public in the search endpoint results, confusing users and preventing the file from loading correctly in IGB.
Task: Investigate how to better ascertain whether a file has been made public. Public files are those that have been shared with the user "anonymous". When this occurs the file becomes available through the dav-anon url:
https://data.cyverse.org/dav-anon/iplant/home/nowlanf/S_SARS-CoV-2_Wuhan-Hu-1_Jan_2020.fa
An idea would be to avoid using the user-permission and search endpoints to determine if a file has been made public, and instead attempt to see if the file is available through dav-anon. If the server returns 200 the file is public, if not then it is private.
Attachments
Issue Links
- relates to
-
IGBF-3021 Improve public file/folder lookup
- To-Do