Commit Graph

1412 Commits

Author SHA1 Message Date
Adam Shimali
f945253596 [WIP] Changed add user to service to take list of permissions instead
of invite.
2016-03-03 17:36:21 +00:00
Martyn Inglis
1d760604e7 Set region 2016-03-03 17:23:52 +00:00
Martyn Inglis
fa4f0d9313 Get the right bucket names 2016-03-03 17:15:20 +00:00
Martyn Inglis
cd24dc223f updated travis 2016-03-03 17:06:07 +00:00
Martyn Inglis
c2eba78c97 updated key 2016-03-03 16:58:03 +00:00
Rebecca Law
632642e790 Merge pull request #128 from alphagov/accept-invite-add-permissions
[WIP] When user is added to a service a list of permissions groups are
2016-03-03 16:57:40 +00:00
Adam Shimali
fc8e27e582 [WIP] When user is added to a service a list of permissions groups are
used to assign the correct permissions to the user.

Last slice will be to update invite status.
2016-03-03 16:38:12 +00:00
Martyn Inglis
9b28a6d4ad Fixed version file to use new names 2016-03-03 16:27:13 +00:00
minglis
bfe0ef5520 Merge pull request #127 from alphagov/status-page
Status page
2016-03-03 15:50:29 +00:00
Martyn Inglis
5a2cf1baca Appeased pep8 2016-03-03 15:38:22 +00:00
Martyn Inglis
13320cbed0 Updated to populate on dev 2016-03-03 15:32:22 +00:00
Martyn Inglis
24a9487a20 Updated status page
- include travis build number
- renamed properties
- ELB version
- moved code all into health check
- changed health check to be on same URL for admin and api
2016-03-03 15:18:12 +00:00
Martyn Inglis
b818e1a535 Populate version data with build number and fixed date 2016-03-03 15:06:10 +00:00
Martyn Inglis
aa6fbdc263 Setting up deployment for staging builds 2016-03-03 14:56:47 +00:00
Martyn Inglis
0453bf85a6 Conditional builds 2016-03-03 14:39:06 +00:00
Martyn Inglis
39a48c5523 Deploy staging branch only 2016-03-03 14:32:13 +00:00
Martyn Inglis
aaedd4d054 Removed unused notifcation status 2016-03-03 12:19:56 +00:00
Rebecca Law
2d142287c2 Merge pull request #125 from alphagov/check-restricted-services-on-tasks
Ensure restricted service are respected by tasks:
2016-03-03 12:17:52 +00:00
Martyn Inglis
800afc9e44 Ensure restricted service are respected by tasks:
This is checked on 3rd party API calls, but jobs (CSV files) were able expected to only allow valid files.

Change in tack means we want to have restricted notification failures reported in the UI.
2016-03-03 12:05:18 +00:00
Rebecca Law
3845a17794 Merge pull request #124 from alphagov/fix_user_service_permissions_url
Fix url for user service permissions.
2016-03-03 11:41:45 +00:00
Nicholas Staples
c80753bb75 Fix url for user service permissions. 2016-03-03 09:59:21 +00:00
Adam Shimali
26120e4e7f Merge pull request #122 from alphagov/correct_permission_enums
Permission enums corrected, all tests passing.
2016-03-02 17:22:03 +00:00
NIcholas Staples
ce7e0cef7a Merge pull request #123 from alphagov/add-routing-keys
Add routing keys to celery queues.
2016-03-02 16:30:08 +00:00
Nicholas Staples
9acc528988 Update migration to fix bug. 2016-03-02 16:25:15 +00:00
Rebecca Law
0169ebe69a Add routing keys to celery queues.
NOTE: make sure upstart script on preview is updated before merging.
2016-03-02 16:22:22 +00:00
Nicholas Staples
ebec54cb80 Permission enums corrected, all tests passing. 2016-03-02 15:34:26 +00:00
Rebecca Law
3fd3aa5b3e Merge pull request #119 from alphagov/update_permission_endpoints
Update permission endpoints
2016-03-02 14:33:18 +00:00
NIcholas Staples
45ae336bd0 Merge pull request #121 from alphagov/revert-queue-config
Revert queue config
2016-03-02 14:15:54 +00:00
Rebecca Law
fde062ec7d Reduce polling_interval back to 1 second 2016-03-02 14:04:03 +00:00
Rebecca Law
0c4b34d65a Merge branch 'master' into revert-queue-config 2016-03-02 13:20:55 +00:00
Rebecca Law
6d44a91696 Removed unused tests 2016-03-02 13:20:12 +00:00
Rebecca Law
6a739d5ec9 Remove celery_queues from config.
Removed unused endpoint.
2016-03-02 13:15:23 +00:00
NIcholas Staples
18baa6ffc7 Merge pull request #120 from alphagov/template-personalisation-fix
Fix bug where sending messages failed
2016-03-02 12:57:16 +00:00
Chris Hill-Scott
b202af716d Fix bug where sending messages failed
When building the template it was looking for a placeholder called
((phone number)). This caused it to fail because the template it had did not
match the personalisation it was being given.

`Template` has an optional parameter for specifying personalisation values that
should be ignored. The recipient of a message is an example of such a value.

This commit passes that extra parameter, which fixes that bug.
2016-03-02 12:27:50 +00:00
NIcholas Staples
62f66329a9 Merge pull request #117 from alphagov/time-3rd-party-calls
Add logging around 3rd party delivery calls
2016-03-02 11:27:00 +00:00
NIcholas Staples
90b5082972 Merge pull request #109 from alphagov/replace-placeholders
Replace placeholders with personalisation
2016-03-02 11:25:26 +00:00
Chris Hill-Scott
cc741003c0 Log FireText exceptions as exceptions 2016-03-02 11:14:32 +00:00
Chris Hill-Scott
0e5d72494e Prefix all SMS messages with service name
Implements https://github.com/alphagov/notifications-utils/pull/4
2016-03-02 11:14:32 +00:00
Nicholas Staples
01f616eeac Fix all tests. 2016-03-02 11:10:52 +00:00
Nicholas Staples
6f689a187e Merge remote-tracking branch 'origin/master' into update_permission_endpoints 2016-03-02 10:44:38 +00:00
Nicholas Staples
bd898a4526 Upgrade and downgrade now works.
Fix bug with repeated upgrade and downgrade.

Fix script revision number.
2016-03-02 10:44:20 +00:00
Martyn Inglis
35b7b884f8 Add logging around 3rd party delivery calls
- time SES, Twilio, fire text calls
- use monotonic for accuracy
2016-03-02 09:33:20 +00:00
Rebecca Law
f1cf4eddd5 Merge pull request #116 from alphagov/queues-defined-in-config
Moved the deinition of which queues the worker will consume from
2016-03-02 09:21:29 +00:00
Chris Hill-Scott
fa4b2e16e7 Remove CSV utils
These are in the utils repo since https://github.com/alphagov/notifications-utils/releases/tag/0.2.1
2016-03-02 08:59:34 +00:00
Chris Hill-Scott
d6f7c7d1c9 Replace placeholders before sending a message
This commit replaces placeholders in a template with the user’s data, using
the Template class from utils
(https://github.com/alphagov/notifications-utils/tree/master/utils#template)

It also extracts the personalisation data from the CSV, taking account of the
different column headings that SMS and email CSVs will have.

At the point of creating the task to send an individual messages, validation of
the placeholders matching the template is assumed to have been done either:
- in processing the CSV in the admin app
- in the endpoint for the API call

No exceptions should be raised at this point.
2016-03-02 08:59:34 +00:00
Chris Hill-Scott
68eaacaafb Accept and validate personalisation
This commit allows the send notification endpoint to accept an extra parameter,
`personalisation`, the contents of which will be used (later) to replace the
placeholders in the template.

It does validation in the following places:
- at the schema level, to validate the type and (optional) presence of
  personalisation
- at the endpoint, to check whether the personalisation provided matches exactly
  the placeholders in the template

It does not do validation when processing CSV files, as these are assumed to
already have been validated by the admin app.

It explicitly does not persist either the names of the placeholders (these
should always be derived from the template contents unless it really becomes a
performance concern) or the values of the placeholders (because they might be
personal data).
2016-03-02 08:59:34 +00:00
Chris Hill-Scott
68f31c6f84 Refactor send notification into one route
Using a URL parameter means that sending a notification can be done in one
route, rather than two separate routes and an extra method.

This commit also refactors that one remaining method to be shorter/cleaner/more
readable (or I think so anyway).

No functional changes in this commit.
2016-03-02 08:59:34 +00:00
Nicholas Staples
47c4368007 Merge with master. 2016-03-01 17:18:46 +00:00
Martyn Inglis
3872ac5e67 Moved the deinition of which queues the worker will consume from
- now in config not the script
2016-03-01 16:57:06 +00:00
Rebecca Law
a2b1dc0432 Merge pull request #115 from alphagov/accept-invite
[WIP] Start of api for accepting invite.
2016-03-01 15:57:52 +00:00