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

Conceal the name of the editor during project submission. Ref #2117. #2156

Merged
merged 3 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
[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 @@ -640,3 +640,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 @@ -192,7 +192,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 @@ -1388,11 +1388,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
Loading