Commit bfbd3720 authored by Bryan  BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

allows curators to download former version iff they did the change

parent b4dc2575
......@@ -445,13 +445,17 @@ def get_log_entry_with_permission_check_or_404(request, pk, log_pk, allow_curato
@login_required
def data_source_history_download(request, pk, log_pk):
data_source, le = get_log_entry_with_permission_check_or_404(
request,
pk,
log_pk,
allow_curator=True,
user_id=request.user.id,
)
try:
data_source, le = get_log_entry_with_permission_check_or_404(request, pk, log_pk)
except Http404:
# if we cannot get it, then allows curators, but only on their own entry
data_source, le = get_log_entry_with_permission_check_or_404(
request,
pk,
log_pk,
allow_curator=True,
user_id=request.user.id,
)
file_path = business_process.get_backup_file_path(le, test_if_exists=True)
if file_path is None:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment