Duke-GCB / D4S2

Web service to facilitate notification and transfer of projects in DukeDS
MIT License
0 stars 0 forks source link

Updates ownership views to support S3 deliveries #139

Closed dleehr closed 6 years ago

dleehr commented 6 years ago

Fixes #131

dleehr commented 6 years ago

I have not tested that the email templates use the transfer_id as expected - emailing was out of scope for this feature so I've been constructing the URLs manually

Summary of my testing on local dev environment:

  1. Create 3 django users: sender, receiver, agent
  2. Create S3UserCredentials for each. Since I had two credentials, I used one for sender and agent and the other for receiver
  3. As the sender:
    s3 mb s3://d4s2-test-2018-04-25
    s3 cp d4s2-test-2018-04-25/hello.txt s3://d4s2-test-2018-04-25
    datadelivery deliver -b d4s2-test-2018-04-25 --email receiver-email@domain.com
  4. Confirm S3Delivery created in API and email printed out to console
  5. Get the transfer_id from the S3 delivery:
    python manage.py shell
    >>> from d4s2_api.models import S3Delivery
    >>> str(S3Delivery.objects.first().transfer_id)
    '0c328d98-b40a-4e12-ba3b-64076db6b7f5'
  6. As the receiver, login to D4S2 using django credentials
  7. Construct url with delivery_type and transfer_id http://localhost:8000/ownership/?delivery_type=s3&transfer_id=0c328d98-b40a-4e12-ba3b-64076db6b7f5
  8. Accept the delivery
  9. Confirm that the sender can no longer see a project, but the receiver has a copy.
johnbradley commented 6 years ago

I'm still reviewing this, accidentally click the wrong option.

dleehr commented 6 years ago

@johnbradley: 07875ccfb872f912e7e3f33072f2d79f57da8000 adds consistent checking for completed deliveries in the areas you caught.