Commit Graph

4475 Commits

Author SHA1 Message Date
Chris Hill-Scott
1d10ad2247 Stop content security policy blocking GA
In https://github.com/alphagov/notifications-admin/pull/1583 we changed
our Google Analytics settings to use newer browsers’ `sendBeacon`
feature. The advantage of this is that it

> [ensures] that the data has been sent during the unloading of a
> document [which] is something that has traditionally been difficult
> for developers

– https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon

To transmit this data it uses a AJAX request (`XMLHttpRequest`)
underneath. AJAX requests are governed by the `connect-src` content
security policy (or the `default-src` if one is not present).
`connect-src`:

> Applies to XMLHttpRequest (AJAX), WebSocket or EventSource. If not
> allowed the browser emulates a 400 HTTP status code.

– https://content-security-policy.com/

Because we didn’t have one in place, `sendBeacon` requests to GA were
getting blocked in browsers that support content security policy (pretty
much everything better than IE11[1]).

1. https://caniuse.com/#feat=beacon
2017-11-06 10:25:30 +00:00
Chris Waszczuk
98c8ddca38 Merge pull request #1598 from gov-cjwaszczuk/master
Email auth for inviting members and editing permissions
2017-11-06 10:00:15 +00:00
Pete Herlihy
8985f3978e Merge pull request #1611 from alphagov/inbound-callback
Inbound callback page
2017-11-03 16:22:48 +00:00
Chris Hill-Scott
240f25eaf9 Fix failing tests 2017-11-03 16:15:39 +00:00
Chris Hill-Scott
c19855c0b0 Fix missing import 2017-11-03 16:12:37 +00:00
Pete Herlihy
60a39b2e49 Updated the callbacks page to add the link to new documentation. 2017-11-03 16:10:26 +00:00
Pete Herlihy
55093691f1 Updated test to reflect new label on callback URL field 2017-11-03 16:05:10 +00:00
Pete Herlihy
431e269cf9 Updated the field label for the callback URL 2017-11-03 16:02:43 +00:00
Pete Herlihy
4b2ba34d68 Updated the label to set the callback URL on the settings page 2017-11-03 14:25:31 +00:00
Pete Herlihy
bc7af49b56 New page explaining the format of callback messages 2017-11-03 14:24:10 +00:00
Chris Hill-Scott
c0f1de2342 Merge pull request #1596 from alphagov/extra-letter-spacing-phone-search
Add extra letter spacing to phone number search
2017-11-03 14:20:21 +00:00
Chris Hill-Scott
2ed46b6458 Merge pull request #1606 from tuzz/fix-a-typo
Fix a typo: generates -> generate
2017-11-03 14:20:15 +00:00
Chris Hill-Scott
0b35f70023 Merge pull request #1609 from alphagov/use-service-property-to-prefix-sms
Use service setting to determine prefixing of SMSs
2017-11-03 14:19:24 +00:00
Chris Hill-Scott
ba128d05bc Use service setting to determine prefixing of SMSs
Rather than doing this nasty `if` statement, let the API work out what
to do. Also means that the logic is not repeated between the two apps.
2017-11-03 13:14:10 +00:00
Pete Herlihy
9eb83792cf Added test for new callbacks static page 2017-11-03 11:57:29 +00:00
Pete Herlihy
2c74027e0d Adding a route for 'callbacks' page
Gone with callbacks as this page may be extended for delivery receipts in the future.
2017-11-03 11:56:15 +00:00
Rebecca Law
fa6e4971c9 Merge pull request #1603 from alphagov/sms-sender-for-one-off
Select text message sender for one off notifications
2017-11-02 16:35:51 +00:00
Rebecca Law
3e10cfb165 Rename test 2017-11-02 16:30:49 +00:00
Rebecca Law
edf0e0ec13 Merge pull request #1604 from alphagov/fix-format-on-trial-service
Fix some formatting on the trial mode services page
2017-11-02 16:28:04 +00:00
Rebecca Law
ff22c83b1d Added a hint to show default and receives text messages 2017-11-02 15:48:19 +00:00
Rebecca Law
83bfc50884 Added a hint for Receives replies 2017-11-02 14:58:14 +00:00
Leo Hemsted
3c034a43b9 Merge pull request #1605 from alphagov/invitation-expiry-fix
make sure old invites get the proper err message
2017-11-02 14:03:35 +00:00
Chris Patuzzo
5152fa8e82 Fix a typo: generates -> generate 2017-11-02 13:51:00 +00:00
Leo Hemsted
04adb15e85 make sure old invites get the proper message
we were accidentally covering up the expiry message with a more
generic one
2017-11-02 13:49:24 +00:00
Rebecca Law
3f1c543735 Fix some formatting on the trial mode services page 2017-11-02 13:39:37 +00:00
chrisw
c6ea90a7d8 Email auth for inviting members and editing permissions 2017-11-02 12:38:01 +00:00
Rebecca Law
2ea921952f This PR adds the ability to select a text message sender if more than one exist for the service. 2017-11-02 12:07:46 +00:00
Rebecca Law
5e175954d2 Merge pull request #1600 from alphagov/add-letters-to-platform-admin
Add letter counts to the platform admin page.
2017-11-02 10:16:02 +00:00
Leo Hemsted
e6f5b08f21 Merge pull request #1592 from alphagov/load-service-err
make sure load_service_before_request handles 404s
2017-11-01 16:47:25 +00:00
Leo Hemsted
80b5af6ed9 Merge branch 'master' into load-service-err 2017-11-01 16:43:51 +00:00
Leo Hemsted
6742560b33 Merge pull request #1599 from alphagov/new-acc-email-validation
New account verification emails no longer call API
2017-11-01 16:43:04 +00:00
Pete Herlihy
1d2b761161 Merge pull request #1597 from alphagov/100-102
100-102 for GOV.UK Email and SSCSA
2017-11-01 16:38:56 +00:00
Rebecca Law
4acfd4101f Add letter counts to the platform admin page.
The big number counts are based on how many messages have been delivered. For letters we are using the requested count.
2017-11-01 16:33:06 +00:00
Leo Hemsted
9eb5e6a532 make sure invite tokens still check token on admin for error handler to kick in 2017-11-01 16:17:04 +00:00
Leo Hemsted
19f731ec07 add error handler that catches invalid tokens, and returns 404 2017-11-01 15:47:05 +00:00
Leo Hemsted
aff9d47323 don't hit API when checking new account email-token
we currently store new account email verify tokens in the database, and
check against that to work out if they've expired. But we don't need to
do that, tokens have their own timing mechanism. So lets just use that,
and free up the database to do other things.

Also, standardised the forgot password, change email, and new account
email verification timeouts to all be an hour, from the config val
'EMAIL_EXPIRY_SECONDS'
2017-11-01 15:32:24 +00:00
Pete Herlihy
fafb8dc75b 100-102 for GOV.UK Email and SSCSA 2017-11-01 14:50:15 +00:00
Chris Hill-Scott
57ca2b48ee Add extra letter spacing to phone number search
This is another place where you might be transcribing a phone number and
having it spaced out will make it easier for you to spot errors.
2017-10-31 17:54:22 +00:00
Pete Herlihy
756bdd3181 Merge pull request #1595 from alphagov/98-100
98 to 100 services..... woo hoo....
2017-10-31 16:13:44 +00:00
Pete Herlihy
061ef3dddc 98 to 100 services..... woo hoo....
Also corrected the org count to 44 as HM Passports Office isn't a separate org from Home Office.
2017-10-31 12:27:34 +00:00
Chris Hill-Scott
e665f35acc Merge pull request #1590 from alphagov/pyup-update-pytz-2017.2-to-2017.3
Update pytz to 2017.3
2017-10-31 09:12:38 +00:00
Chris Hill-Scott
1f035cb2d7 Merge pull request #1589 from alphagov/analytics-failwhale
Standardise analytics code on failwhale
2017-10-31 09:04:32 +00:00
Leo Hemsted
0c7bc350d7 Merge pull request #1593 from alphagov/fix-auth-rollout
add auth_type default to InvitedUser object
2017-10-30 17:43:57 +00:00
Leo Hemsted
273b864dce add auth_type default to InvitedUser object
we unpack the api invited user rest endpoint results straight into the
InvitedUser object, so we should make sure that any fields added to
the api response are mentioned here
2017-10-30 17:38:50 +00:00
Leo Hemsted
3128b5424d make sure load_service_before_request handles 404s
if it 404s, because the service id doesn't exist, then it should die
gracefully (showing a 404 error page), rather than what it currently
does, which is die kicking and screaming with a 500
2017-10-30 16:59:24 +00:00
Chris Waszczuk
76730579e1 Merge pull request #1591 from gov-cjwaszczuk/master
Fixed broken edit functionality
2017-10-30 15:40:32 +00:00
chrisw
d02cd67b0d Fixed broken edit functionality 2017-10-30 15:31:35 +00:00
pyup-bot
2ec3c26b2e Update pytz from 2017.2 to 2017.3 2017-10-30 14:25:43 +00:00
Chris Waszczuk
dd88d007e1 Merge pull request #1580 from gov-cjwaszczuk/master
Added Multiple SMS sender functionality
2017-10-30 13:49:21 +00:00
chrisw
4e721c95ce Added Multiple SMS sender functionality 2017-10-30 13:40:34 +00:00