Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web 205 cli command analysis download command is not working #99

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

amiaynara
Copy link
Contributor

@amiaynara amiaynara commented Sep 18, 2023

Story: https://basepairtech.atlassian.net/browse/WEB-205

Need for the PR

When using the CLI the users are not able to download files/samples that have been shared to them. This is because we are using the directory structure based permission policy when doing aws cp source destination.

Solution

Instead of relying on the permission set by the policy, we will check the permission using the permission methods defined in https://github.com/basepair/webapp/pull/1588/files#diff-f9795f315b679b5b1e2ced76b2291763cfdf9f48fba6dcd284a20c1e258209d4 to check if the user has access (or has been granted the permission by the owner).

Approach

  1. whenever a request to dowload a file is created
  2. check the permission making the api call to webapp
  3. if permission exists, generate the pre-signed url.
  4. using that presigned url download the files; instead of using aws cp we will be using requests library to dowload

dependent pr:
https://github.com/basepair/webapp/pull/1588

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant