Skip to content

Commit 2948606

Browse files
authored
Ensure Blue Button 2.0 is not used on sandbox (#1646)
* Ensure Blue Button 2.0 is not used on sandbox * PR fixes * PR feedback * PR Feedback 2
1 parent 5c0ac87 commit 2948606

28 files changed

Lines changed: 633 additions & 439 deletions

apps/accounts/emails.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import logging
22
import random
33

4-
from apps.constants import HHS_SERVER_LOGNAME_FMT
5-
64
from django.conf import settings
75
from django.urls import reverse
6+
7+
from apps.constants import HHS_SERVER_LOGNAME_FMT
88
from libs.decorators import waffle_function_switch
99
from libs.mail import Mailer
1010

11-
1211
logger = logging.getLogger(HHS_SERVER_LOGNAME_FMT.format(__name__))
1312

1413

@@ -21,13 +20,17 @@ def send_activation_key_via_email(user, signup_key):
2120
"""Send an email with activation key and welcome message."""
2221
activation_link = '%s%s' % (get_hostname(), reverse('activation_verify', args=(signup_key,)))
2322
mailer = Mailer(
24-
subject='Verify Your Blue Button 2.0 Developer Sandbox Account',
23+
subject='Verify Your Blue Button API Developer Sandbox Account',
2524
template_text='email/email-activate.txt',
2625
template_html='email/email-activate.html',
2726
to=[
2827
user.email,
2928
],
30-
context={'ACTIVATION_LINK': activation_link, 'ACTIVATION_KEY': signup_key, 'EXPIRATION': settings.SIGNUP_TIMEOUT_DAYS},
29+
context={
30+
'ACTIVATION_LINK': activation_link,
31+
'ACTIVATION_KEY': signup_key,
32+
'EXPIRATION': settings.SIGNUP_TIMEOUT_DAYS,
33+
},
3134
)
3235
mailer.send()
3336
logger.info('Activation link sent to {} ({})'.format(user.username, user.email))
@@ -41,7 +44,9 @@ def get_hostname():
4144
elif 'https://' in hostname.lower():
4245
pass
4346
else:
44-
logger.debug('HOSTNAME_URL [%s] does not contain http or https prefix. Issuer:%s' % (settings.HOSTNAME_URL, hostname))
47+
logger.debug(
48+
'HOSTNAME_URL [%s] does not contain http or https prefix. Issuer:%s' % (settings.HOSTNAME_URL, hostname)
49+
)
4550
# no http/https prefix in HOST_NAME_URL so we add it
4651
hostname = 'https://%s' % (hostname)
4752
return hostname

apps/bb2_tools/apps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
class BB2ToolsConfig(AppConfig):
55
name = 'apps.bb2_tools'
66
label = 'bb2_tools'
7-
verbose_name = 'Blue Button 2.0 Tools'
7+
verbose_name = 'Blue Button API Tools'
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{% extends "admin/change_list.html" %}
22
{% load humanize %}
33
{% block content_title %}
4-
<h1> Blue Button API 2.0 Splunk Dashboards </h1>
4+
<h1> Blue Button API Splunk Dashboards </h1>
55
{% endblock %}
66
{% block result_list %}
77

88
<div class="results">
99
<ul>
1010
{% for d in splunk_dashboards %}
11-
<li><a href="{{ d.url }}" target="_blank" rel="noopener noreferrer">{{ d.display_name }}</a></li>
11+
<li><a href="{{ d.url }}" target="_blank" rel="noopener noreferrer">{{ d.display_name }}</a></li>
1212
{% endfor %}
13-
</ul>
13+
</ul>
1414
</div>
1515
{% endblock %}
16-
{% block pagination %}{% endblock %}
16+
{% block pagination %}{% endblock %}

apps/creds/templates/get_creds.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
{% load static %}
44

55
{% block bannerTitle %}
6-
Blue Button 2.0 API Prod Access Credentialing
6+
Blue Button API Prod Access Credentialing
77
{% endblock %}
88

99
{% block bannerDescription %}
10-
The Blue Button 2.0 API Prod Access Credentialing allows you to obtain the OAUTH2.0 app credentials for your
10+
The Blue Button API Prod Access Credentialing allows you to obtain the OAUTH2.0 app credentials for your
1111
application.
1212
{% endblock %}
1313

0 commit comments

Comments
 (0)