forked from dandi/dandi-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from aplbrain/9-update-email-sent-to-new-users
EMBER-ify emails. Fix admin email
- Loading branch information
Showing
9 changed files
with
31 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,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: | ||
|
@@ -100,7 +100,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)}, | ||
|
@@ -123,7 +123,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], | ||
) | ||
|
@@ -138,7 +138,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', | ||
{ | ||
|
@@ -159,7 +159,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', | ||
{ | ||
|
@@ -181,7 +181,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], | ||
) | ||
|
@@ -228,7 +228,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 get_dandiset_owners(dandiset)], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} | ||
|
@@ -32,7 +32,7 @@ <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. | ||
Contact us at <a href="mailto:[email protected]">[email protected]</a> if you have any questions. | ||
</div> | ||
|
||
<script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
{% 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. | ||
- 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. | ||
|
||
- Without an academic email, account approval is still possible under specific circumstances. You can appeal the decision by contacting [email protected]. | ||
- Without an academic email, account approval is still possible under specific circumstances. You can appeal the decision by contacting [email protected]. | ||
|
||
For more information, see the "Create a DANDI Account page" at https://docs.dandiarchive.org/16_account. | ||
|
||
Sincerely, | ||
|
||
The DANDI team | ||
The EMBER team | ||
{% endautoescape %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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> | ||
|
||
|
@@ -14,13 +14,13 @@ <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://about.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> | ||
href="mailto:[email protected]">email</a>. Have a great day!</p> | ||
{% endblock body %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,13 +33,13 @@ export default defineComponent({ | |
switch (user.value?.status) { | ||
case 'PENDING': | ||
return { | ||
text: 'Your DANDI account is currently pending approval. Please allow up to 2 business days for approval and contact the DANDI admins at [email protected] if you have any questions.', | ||
text: 'Your DANDI account is currently pending approval. Please allow up to 2 business days for approval and contact the DANDI admins at [email protected] if you have any questions.', | ||
icon: 'mdi-timer-sand-empty', | ||
color: 'warning', | ||
}; | ||
case 'REJECTED': | ||
return { | ||
text: 'Your DANDI account was denied approval. Please contact the DANDI admin team at [email protected] if you would like to appeal this decision.', | ||
text: 'Your DANDI account was denied approval. Please contact the DANDI admin team at [email protected] if you would like to appeal this decision.', | ||
icon: 'mdi-close-octagon', | ||
color: 'error', | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ | |
</span> | ||
<br><br> | ||
<span class="text-body-2"> | ||
For further assistance, please contact <a href="mailto:[email protected]">[email protected]</a>. | ||
For further assistance, please contact <a href="mailto:[email protected]">[email protected]</a>. | ||
</span> | ||
</div> | ||
</v-container> | ||
|