Skip to content

Commit

Permalink
Conceal the name of the editor during project submission (#2156)
Browse files Browse the repository at this point in the history
This pull request removes the name of the editor from the submission
history page, and add general contact information for the platform.
  • Loading branch information
Benjamin Moody committed Jan 11, 2024
2 parents 76d1d0d + df16e53 commit 323cdff
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ CONTACT_EMAIL='PhysioNet Contact <[email protected]>'
SERVER_EMAIL='PhysioNet System <[email protected]>'
ERROR_EMAIL='[email protected]'

# Contact address for project editors. This address may be viewable by authors.
# Optionally, add "PROJECT-SLUG" to include the project slug.
PROJECT_EDITOR_EMAIL='[email protected]'

# Admins
ADMINS_NAME=PhysioNet Technical
ADMINS_MAIL=[email protected]
Expand Down
3 changes: 3 additions & 0 deletions physionet-django/physionet/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,3 +641,6 @@ class StorageTypes:
# Django configuration for file upload (see https://docs.djangoproject.com/en/4.2/ref/settings/)
DATA_UPLOAD_MAX_NUMBER_FILES = config('DATA_UPLOAD_MAX_NUMBER_FILES', cast=int, default=1000)
DATA_UPLOAD_MAX_MEMORY_SIZE = config('DATA_UPLOAD_MAX_MEMORY_SIZE', cast=int, default=2621440)

# Emails
PROJECT_EDITOR_EMAIL = config('PROJECT_EDITOR_EMAIL', default='')
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ <h5 class="modal-title">Resubmit Project</h5>
<li class="list-group-item">
<div class="row">
<div class="col-md-2">{{ project.editor_assignment_datetime|date }}</div>
<div class="col-md-10">The project was assigned to an editor: {{ project.editor.disp_name_email }}
<div class="col-md-10">The project was assigned to an editor. To contact the editor, email:<br />{{ contact_email }}
</div>
</li>
{% endif %}
Expand Down
25 changes: 20 additions & 5 deletions physionet-django/project/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1418,11 +1418,26 @@ def project_submission(request, project_slug, **kwargs):
else:
edit_logs, copyedit_logs = None, None

return render(request, 'project/project_submission.html', {
'project':project, 'authors':authors,
'is_submitting':is_submitting, 'author_comments_form':author_comments_form,
'edit_logs':edit_logs, 'copyedit_logs':copyedit_logs,
'awaiting_user_approval':awaiting_user_approval})
if settings.PROJECT_EDITOR_EMAIL:
contact_email = settings.PROJECT_EDITOR_EMAIL.replace('PROJECT-SLUG',
project.slug)
else:
contact_email = project.editor.email

return render(
request,
"project/project_submission.html",
{
"project": project,
"authors": authors,
"is_submitting": is_submitting,
"author_comments_form": author_comments_form,
"edit_logs": edit_logs,
"copyedit_logs": copyedit_logs,
"awaiting_user_approval": awaiting_user_approval,
"contact_email": contact_email,
},
)


@project_auth(auth_mode=0, post_auth_mode=2)
Expand Down

0 comments on commit 323cdff

Please sign in to comment.