Skip to content

Commit

Permalink
Update emails sent to users and Admin email account
Browse files Browse the repository at this point in the history
  • Loading branch information
NEStock committed Feb 14, 2025
1 parent 824a712 commit 7a9aa51
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 29 deletions.
14 changes: 7 additions & 7 deletions dandiapi/api/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}

# TODO: turn this into a Django setting
ADMIN_EMAIL = '[email protected]'
ADMIN_EMAIL = '[email protected]'


def user_greeting_name(user: User, socialaccount: SocialAccount = None) -> str:
Expand Down Expand Up @@ -98,7 +98,7 @@ def send_ownership_change_emails(dandiset, removed_owners, added_owners):
def build_registered_message(user: User, socialaccount: SocialAccount):
# Email sent to the DANDI list when a new user logs in for the first time
return build_message(
subject=f'DANDI: New user registered: {user.email}',
subject=f'EMBER-DANDI: New user registered: {user.email}',
message=render_to_string(
'api/mail/registered_message.txt',
{'greeting_name': user_greeting_name(user, socialaccount)},
Expand All @@ -121,7 +121,7 @@ def build_new_user_messsage(user: User, socialaccount: SocialAccount = None):
}
# Email sent to the DANDI list when a new user logs in for the first time
return build_message(
subject=f'DANDI: Review new user: {user.username}',
subject=f'EMBER-DANDI: Review new user: {user.username}',
message=render_to_string('api/mail/new_user_message.txt', render_context),
to=[ADMIN_EMAIL],
)
Expand All @@ -136,7 +136,7 @@ def send_new_user_message_email(user: User, socialaccount: SocialAccount):

def build_approved_user_message(user: User, socialaccount: SocialAccount = None):
return build_message(
subject='Your DANDI Account',
subject='Your EMBER-DANDI Account',
message=render_to_string(
'api/mail/approved_user_message.txt',
{
Expand All @@ -157,7 +157,7 @@ def send_approved_user_message(user: User, socialaccount: SocialAccount):

def build_rejected_user_message(user: User, socialaccount: SocialAccount = None):
return build_message(
subject='Your DANDI Account',
subject='Your EMBER-DANDI Account',
message=render_to_string(
'api/mail/rejected_user_message.txt',
{
Expand All @@ -179,7 +179,7 @@ def send_rejected_user_message(user: User, socialaccount: SocialAccount):
def build_pending_users_message(users: Iterable[User]):
render_context = {**BASE_RENDER_CONTEXT, 'users': users}
return build_message(
subject='DANDI: new user registrations to review',
subject='EMBER-DANDI: new user registrations to review',
message=render_to_string('api/mail/pending_users_message.txt', render_context),
to=[ADMIN_EMAIL],
)
Expand Down Expand Up @@ -226,7 +226,7 @@ def build_dandiset_unembargo_failed_message(dandiset: Dandiset):
render_context = {**BASE_RENDER_CONTEXT, 'dandiset': dandiset_context}
html_message = render_to_string('api/mail/dandiset_unembargo_failed.html', render_context)
return build_message(
subject=f'DANDI: Unembargo failed for dandiset {dandiset.identifier}',
subject=f'EMBER-DANDI: Unembargo failed for dandiset {dandiset.identifier}',
message=strip_tags(html_message),
html_message=html_message,
to=[owner.email for owner in dandiset.owners],
Expand Down
5 changes: 3 additions & 2 deletions dandiapi/api/templates/api/account/questionnaire_form.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends 'api/account/base.html' %}

{% block body %}
<h5>Welcome to DANDI! Please take a moment to fill out this form.</h5>
<h5>Welcome to EMBER-DANDI! Please take a moment to fill out this form.</h5>
<h6><b>Note:</b> No account is necessary to access public data!</h6>
<form method="POST" class="col s12">
{% csrf_token %}
Expand Down Expand Up @@ -32,7 +32,8 @@ <h6><b>Note:</b> No account is necessary to access public data!</h6>
</div>
</form>
<div style="margin-top: 4%">
Contact us at <a href="mailto:[email protected]">[email protected]</a> if you have any questions.
<!-- TODO: Contact Email -->
<!-- Contact us at <a href="mailto:[email protected]">[email protected]</a> if you have any questions. -->
</div>

<script>
Expand Down
6 changes: 3 additions & 3 deletions dandiapi/api/templates/api/mail/approved_user_message.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% autoescape off %}
Dear {{ greeting_name }},

Your DANDI account has been approved. You can go to {{ dandi_web_app_url }} and login with your GitHub account
Your EMBER-DANDI account has been approved. You can go to {{ dandi_web_app_url }} and login with your GitHub account
to start creating dandisets and uploading data.

Please use the following links to post any questions or issues.
Expand All @@ -12,9 +12,9 @@ Issues: https://github.com/dandi/helpdesk/issues/new/choose
YouTube: https://www.youtube.com/@dandiarchive
(please Subscribe)

Thank you for choosing DANDI for your neurophysiology data needs.
Thank you for choosing EMBER-DANDI for your neurophysiology data needs.

Sincerely,

The DANDI team
The EMBER team
{% endautoescape %}
2 changes: 1 addition & 1 deletion dandiapi/api/templates/api/mail/new_user_message.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% autoescape off %}
A new user ({{ username }}) has signed up for DANDI.
A new user ({{ username }}) has signed up for EMBER-DANDI.

Please proceed to the following URL to approve or reject their account:

Expand Down
16 changes: 7 additions & 9 deletions dandiapi/api/templates/api/mail/registered_message.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
{% autoescape off %}
Dear {{ greeting_name }},

Welcome to DANDI.
Welcome to EMBER-DANDI.


Thank you for registering on the DANDI archive. Your account is now pending approval by
a DANDI admin. Once approved, you will be able to create Dandisets and upload data right
away. You will also be able to use the Jupyterhub (https://hub.dandiarchive.org) for
computing on dandisets in the cloud.
Thank you for registering on the EMBER-DANDI archive. Your account is now pending approval by
a EMBER-DANDI admin. Once approved, you will be able to create Dandisets and upload data right
away.

It may take up to 48 hours for your account to be approved and for your email to be
registered with our Slack workspace.
It may take up to 48 hours for your account to be approved.

Please use the following links to post any questions or issues.

Expand All @@ -20,9 +18,9 @@ Issues: https://github.com/dandi/helpdesk/issues/new/choose
YouTube: https://www.youtube.com/@dandiarchive
(please Subscribe)

Thank you for choosing DANDI for your neurophysiology data needs.
Thank you for choosing EMBER-DANDI for your neurophysiology data needs.

Sincerely,

The DANDI team
The EMBER team
{% endautoescape %}
6 changes: 3 additions & 3 deletions dandiapi/api/templates/api/mail/rejected_user_message.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% autoescape off %}
Dear {{ greeting_name }},

Your DANDI account has been denied approval.
Your EMBER-DANDI account has been denied approval.
{% if rejection_reason %}
Detailed reason:
{{ rejection_reason }}
{% endif %}

DANDI is freely accessible to the neuroscience research community. Membership is usually granted automatically to GitHub accounts with a .edu or similar academic email. If your registration is denied:
EMBER-DANDI is freely accessible to the neuroscience research community. Membership is usually granted automatically to GitHub accounts with a .edu or similar academic email. If your registration is denied:

- With an academic email not linked to your GitHub, please contact [email protected] for assistance using this academic email address to verify your academic affiliation.

Expand All @@ -17,5 +17,5 @@ For more information, see the "Create a DANDI Account page" at https://www.dandi

Sincerely,

The DANDI team
The EMBER team
{% endautoescape %}
9 changes: 5 additions & 4 deletions dandiapi/api/templates/api/root_content.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% block body %}
<h5>Welcome! Are you lost?</h5>

<p>This is the Django service that supports the DANDI API. There's
<p>This is the Django service that supports the EMBER-DANDI API. There's
nothing specifically valuable at this exact location. You are probably
looking for one of the following instead:</p>

Expand All @@ -14,13 +14,14 @@ <h5>Welcome! Are you lost?</h5>
<li><a href="{% url 'schema-redoc' %}">Redoc</a> documentation for
the same</lit>

<li>The <a href="{{ web_app_url }}">DANDI Archive</a>
<li>The <a href="{{ web_app_url }}">EMBER-DANDI Archive</a>
instance associated with this API server</li>

<li>The <a href="https://www.dandiarchive.org">DANDI project</a>
website</li>
</ul>

<p>If none of these is helpful, you can contact the DANDI team by <a
href="mailto:[email protected]">email</a>. Have a great day!</p>
<!-- TODO: Contact Email -->
<!-- <p>If none of these is helpful, you can contact the DANDI team by <a
href="mailto:[email protected]">email</a>. Have a great day!</p> -->
{% endblock body %}

0 comments on commit 7a9aa51

Please sign in to comment.