Commit Graph

36 Commits

Author SHA1 Message Date
Chris Hill-Scott
9327f83411 Fix bug with whitelist
Implements https://github.com/alphagov/notifications-utils/pull/17
2016-04-05 11:59:17 +01:00
Chris Hill-Scott
7a0a81c07c Show error if restricted service uploads real CSV
Implements: https://github.com/alphagov/notifications-utils/pull/16

Also changes a bunch of the mocked phone numbers to be real-looking so
that the tests are checking for the right kind of error.
2016-04-04 17:17:52 +01:00
Chris Hill-Scott
f921a2dcb6 Strip trailing CSV rows, relax phone validation
Implements (and depends on):
- https://github.com/alphagov/notifications-utils/pull/14
- https://github.com/alphagov/notifications-utils/pull/15
2016-03-24 20:34:24 +00:00
Chris Hill-Scott
c92879dba0 Only prefix SMS templates with service name
Implements: https://github.com/alphagov/notifications-utils/pull/13

Fixes: https://www.pivotaltracker.com/story/show/115879891
2016-03-21 11:24:43 +00:00
Chris Hill-Scott
91b4545adc Don’t mix errors with valid rows
Brings in: https://github.com/alphagov/notifications-utils/pull/11

Changes the number of rows shown to be at most 15 (either 15 rows with errors
or 15 valid rows.
2016-03-14 16:53:21 +00:00
Chris Hill-Scott
0a5bf0bc44 Update to utils 2.0.0
…and remove the code from this app that has moved into utils.
2016-03-08 17:18:42 +00:00
NIcholas Staples
f0e0006a7c Merge pull request #213 from alphagov/accept-phone-or-email-column
Accept CSVs with 'email address' or 'phone number'
2016-03-02 11:27:24 +00:00
Chris Hill-Scott
b57ac2f7e5 Accept CSVs with 'email address' or 'phone number'
CSV files currently have ‘to’ as the recipient column. This is changing in
https://github.com/alphagov/notifications-api/pull/109

The admin app also has to validate that the CSV files have the right columns,
because the API expects any CSV that it’s given to have been checked (also we
want things to actually work).

This commit is the minimum code change needed. In the future it should reuse
the same code as the API for processing CSV files. This will need more thinking.
2016-03-02 10:41:35 +00:00
Martyn Inglis
7b5e8061e2 Slight (bad) hack to ensure that the ticks appear on the manage user page
- changes imports for utils from broken version on previous branch
2016-03-01 10:45:13 +00:00
Chris Hill-Scott
2f91848a42 Prefix text messages with service name
Brings in: https://github.com/alphagov/notifications-utils/pull/4
2016-02-26 11:57:13 +00:00
Rebecca Law
d24cea904b Bump the version of notifications-python-client 2016-02-24 16:24:50 +00:00
Adam Shimali
ed18a24594 Fix requirements for new utils 2016-02-24 16:10:42 +00:00
Chris Hill-Scott
1e46922876 Make send the send flow generic
This commit parameterises all methods in the send view so that they can send
either emails or SMS messages.

It works out what kind of message it is sending from the `template_type`
property of the template object.

This means that the `Template` util class needs to know about these properties,
which means that this commit depends on:
https://github.com/alphagov/notifications-utils/pull/2

This commit does _not_ add tests for sending emails. The existing tests for
sending SMS still pass, but actually sending emails is outside the scope of
this story.
2016-02-24 09:23:38 +00:00
Rebecca Law
cffd66c62e Updated the api_client call to send_verify_code
The api has now has an user/<user_id>/email-code and user/<user_id>/sms-code
This commit requires an update to the python-client. Make sure the PR for that version has been merged first and the tag push using scripts/push_tag.sh
2016-02-19 16:08:44 +00:00
Chris Hill-Scott
2d55bb7ae2 Use Template to replace/highlight placeholders
This commit brings in the `Template` util, added here:
https://github.com/alphagov/notifications-utils/pull/1

It also does a fair bit of tidying up, which I’ve unfortunately squashed into
this one massive commit. The main change is moving 404 handling into the
templates dao, so that every view isn’t littered with `try: … except(HTTPError)`.

It also adds new features, in a prototypy sort of way, which are:
- download a prefilled example CSV
- show all the columns for your template on the 'check' page
2016-02-18 15:07:14 +00:00
Nicholas Staples
48368584d9 notifications-python_client upgraded to 0.2.5 2016-02-11 15:27:08 +00:00
Chris Hill-Scott
7e8046be47 Add syntax highlighting to code examples in docs
Uses the Pygments[1] package.

1. http://pygments.org/
2016-02-09 10:33:49 +00:00
Nicholas Staples
ae05da4c01 Update for python client. 2016-01-27 17:04:01 +00:00
Nicholas Staples
323a17952b Update pip requirements. 2016-01-22 15:08:33 +00:00
Nicholas Staples
39cc76947f Bumped version of notifications-python-client. 2016-01-20 17:12:57 +00:00
Nicholas Staples
75d7110642 Updated to send email through the client send_email. 2016-01-20 14:45:50 +00:00
Nicholas Staples
4a73e9315c Implemented send_sms from client. 2016-01-20 09:46:48 +00:00
Nicholas Staples
e73e4ac934 Use new version of client. 2016-01-19 17:23:17 +00:00
Nicholas Staples
3b1d521c10 Tests added for dao. 2016-01-15 15:15:35 +00:00
Nicholas Staples
d42ee85f93 Added new notification-python-client removed check on old one, fixed tests, live service will be broken. 2016-01-14 14:55:07 +00:00
Adam Shimali
d628d3d4cb missing import 2016-01-13 22:46:25 +00:00
Martyn Inglis
2c2d236e85 Incorporate credstash in production wsgi scripts. 2016-01-10 21:33:04 +00:00
Martyn Inglis
ef8964284c Integrated logging from the utils repo 2016-01-07 15:39:36 +00:00
Chris Hill-Scott
fd4c4107ac Remove Flask Assets
This commit’s parent introduces a Node-based way of managing front end assets.

Nothing else is needed in the app, specifically not Flask Assets. Flask itself
automatically routes requests for `domain.tld/static/*` to the files in
`app/static`.

This also removes all the Ruby stuff.
2016-01-05 13:12:35 +00:00
Rebecca Law
a741c128da 108537814: Implementation of 3 factor authentication.
The post register endpoint will send a random 5 digit code via sms and another via email.
If either code fails to send, the user will not be created and the person can register again.
The codes are saved to the session cookie, and expire in 1 hour.

Another iteration of this story will save the codes to a database.
2015-12-04 16:27:11 +00:00
Rebecca Law
ff9e98907e 108536490: Update encryption for password 2015-12-01 10:00:07 +00:00
Rebecca Law
3f017b30f2 108536490: add the proxy_fix 2015-12-01 10:00:07 +00:00
Rebecca Law
7f96ef5a25 108536490: Initial effort to implement log in
Add endpoint for post to /sign-in
Initialise role data
2015-12-01 10:00:06 +00:00
Rebecca Law
abe1d8ae17 108536234: created users and roles data and domain model.
You will need to run the /scripts/bootstrap.sh to create the database for test and the app.
2015-11-25 15:29:12 +00:00
Rebecca Law
a9fe2e6bb7 Add govuk-template-flask-skeleton 2015-11-23 13:50:37 +00:00
Rebecca Law
29012c78ee Initial creation of notify-admin-frontend 2015-11-18 16:19:40 +00:00