MIT-LCP / physionet-build

The new PhysioNet platform.
https://physionet.org/
BSD 3-Clause "New" or "Revised" License
56 stars 20 forks source link

60 day expiry on AnonymousAccess links is too short #1447

Open tompollard opened 2 years ago

tompollard commented 2 years ago

The system allows us to generate AnonymousAccess links for projects. These links are commonly used by data contributors to provide an anonymous link to the editors/reviewers of associated papers (e.g. when the contributor has submitted a data description paper to Scientific Data).

By default the password is set to expire after 60 days.

https://github.com/MIT-LCP/physionet-build/blob/cab745069215ad2f0dbdb06d5ca858e9d6718402/physionet-django/project/modelcomponents/access.py#L197-L205

Often the peer review process for a paper takes longer than 60 days, so this expiry time is too short. We should consider lengthening the expiry time and perhaps allowing the admin team to:

As a temporary fix for an expired password, it is possible to set the creation_datetime to a future data, e.g.

from datetime import timedelta
from project.models import ActiveProject, PublishedProject

x = PublishedProject.objects.get(title__contains="TITLE")
anon = x.anonymous.first()

anon.creation_datetime = anon.creation_datetime + timedelta(days=360)
anon.save()
tompollard commented 2 years ago

In addition, we should make it clear to all users that the link/passphrase has expired. It wasn't clear to me from the admin tool or from the anonymous URL that the problem was an expired passphrase.

tompollard commented 1 year ago

@joamats if you have a chance, please could you take a look at this issue? There should be some fairly simple improvements that we could make to help address this issue (extend expiry date; add expiry date to console). I could walk you through some examples.

joamats commented 1 year ago

hi @tompollard, sure - sounds like something I could help with. Having you walking me through some examples would be important!