Commit Graph

546 Commits

Author SHA1 Message Date
minglis
1866b04eaf Merge pull request #64 from alphagov/move-db-updates-to-be-run-by-ubuntu
New script to run db updates so can be done by ubuntu user
2016-01-11 17:11:41 +00:00
Martyn Inglis
362b2aeba7 New script to run db updates so can be done by ubuntu user 2016-01-11 17:00:04 +00:00
Adam Shimali
7ad7814b3e Merge pull request #59 from alphagov/textbox-macro
Add a WTForms-compatible textbox macro
2016-01-11 16:12:02 +00:00
Adam Shimali
c768d51188 Merge pull request #62 from alphagov/forgot-password
Encrypt entire url for password reset
2016-01-11 15:25:33 +00:00
Chris Hill-Scott
e8fe8c50ba Add a WTForms-compatible textbox macro
This macro:
- accepts a WTForm form field as a parameter
- renders a form field which follows the GOV.UK Elements patterns, both visually
  and in markup terms

It then changes any page which uses either:
- the old, non-WTForms macro or
- the old, WTFforms `render_field` macro

…to use this new macro and removes both of the old ones.

It also adds the option to display hint text above the textbox.
2016-01-11 15:20:00 +00:00
Rebecca Law
05695a1c03 Updated generate_token to use encrypt the entire url.
Created notify_client.sender to hold the methods to send notifications.
2016-01-11 15:18:37 +00:00
Adam Shimali
dd242752c7 Merge pull request #56 from alphagov/add-styleguide
Add styleguide
2016-01-11 15:04:32 +00:00
Adam Shimali
584533eb11 First slice of csv upload of phone numbers for sending messages.
At the moment the file contents are not persisted by checked in
memory.

The first and last three records are show if all are valid.

If there are invalid rows, they are reported and the user is
prompted to go back and sort out upload file.

The storing of upload result (i.e. validation of file) in session
will be removed in next story which is about persisting of file
for later processing.
2016-01-11 15:00:51 +00:00
minglis
aa44a7b036 Merge pull request #60 from alphagov/add-status-page
Added status page
2016-01-11 14:57:37 +00:00
Martyn Inglis
e8a22f4d09 Added status page
- returns "OK" as JSON with a 200
- used in healthchecks
2016-01-11 14:54:23 +00:00
Martyn Inglis
bfb2267249 Updated travis to have build numbers etc on deloyed artifact 2016-01-11 14:43:07 +00:00
Martyn Inglis
d0740d0782 Merge branch 'master' of github.com:alphagov/notifications-admin 2016-01-11 14:38:19 +00:00
Martyn Inglis
a012fb7422 Updated travis to have build numbers etc on deloyed artifact 2016-01-11 14:38:12 +00:00
Chris Hill-Scott
928299e6fe Add 'View source' link 2016-01-11 14:27:31 +00:00
Chris Hill-Scott
85b0b4af21 Replace message_status component with banner
Message status was almost identical to banner, visually and semantically.
This consolidates the two into one component.

This means adding an extra parameter which controls whether or not the banner
has a tick (with and without a tick are the only two variations currently).
2016-01-11 14:27:31 +00:00
Chris Hill-Scott
b303e06ca0 Add a styleguide page
There are now quite a few frontend components in the app.

It’s good to have a reference for them to:
- document for developers what patterns are available and how they are used
- check for regressions
  - when working on one variation of a pattern you can check that your changes
    don’t break other variations of it
  - when changing the arguments to a pattern you can check that this doesn’t
    change the expected arguments already in use

This commit adds a single page (`/_styleguide`) which has examples of all the
patterns.
2016-01-11 14:27:31 +00:00
minglis
14a9cd67e8 Merge pull request #58 from alphagov/remove-db-script
New DB script to replace old one
2016-01-11 13:54:46 +00:00
Martyn Inglis
95b6da9b4e New DB script to replace old one
- forgot about production only properties.
2016-01-11 13:53:55 +00:00
minglis
3b00cb5f27 Merge pull request #57 from alphagov/remove-db-script
Removed unused db script
2016-01-11 13:44:23 +00:00
Martyn Inglis
ee034723b7 Removed unused db script 2016-01-11 13:44:00 +00:00
Martyn Inglis
22adf6481f Setting s3 key to be git commit and zip file 2016-01-11 12:53:12 +00:00
Martyn Inglis
44b40ce764 Setting s3 key to be git commit and zip file 2016-01-11 12:46:21 +00:00
Martyn Inglis
5c732ae868 Setting s3 key to be git commit and zip file 2016-01-11 12:42:06 +00:00
Martyn Inglis
ad9ce73c14 Merge branch 'master' of github.com:alphagov/notifications-admin 2016-01-11 12:40:48 +00:00
Martyn Inglis
ab36541914 Setting s3 key to be git commit and zip file 2016-01-11 12:40:38 +00:00
Adam Shimali
feba58f441 Merge pull request #50 from alphagov/forgot-password
Forgot password and Reset password
2016-01-11 12:34:50 +00:00
Martyn Inglis
68f4623194 Setting s3 key to be git commit and zip file 2016-01-11 12:32:15 +00:00
Rebecca Law
bb1db0c345 When the user request a reset password link, the user.state is set to request_password_reset.
Which means the user will only be able to reset their password, and not sign-in.
Once the user resets the password the user state is set to active once more.
If the link is used a second time they will be redirected to the index page with a message
that the link in the email is not longer valid.
2016-01-11 12:23:08 +00:00
Rebecca Law
0c1592905f Update sign_out to go to the index page not sign-in 2016-01-11 12:23:08 +00:00
Rebecca Law
806c584b03 Reset password token is valid for 1 hour 2016-01-11 12:23:08 +00:00
Rebecca Law
f7373ee5fc Fix wording
Changed forgot-password so that it does not expose to the user that the email address does not exist.
2016-01-11 12:23:08 +00:00
Chris Hill-Scott
677f8891b2 Fix layout and wrong word 2016-01-11 12:23:08 +00:00
Rebecca Law
9ca2f2017f Fix argument 2016-01-11 12:23:08 +00:00
Rebecca Law
c858869a52 Removed exceptions, found a better way to handle them.
Refactored the forms so that fields like email_address can be used in multiple forms.
Refactored form validation so that a query function is passed into the form to be run, this
way the form is not exposed to the dao layer and the query is more efficient.

This PR still requires some frontend attention. Will work with Chris to update the templates.
2016-01-11 12:23:08 +00:00
Rebecca Law
ceb78f49b4 Take out the Canadian politeness.
Make the error message more consistent.
Extracted common fields for the forms.
2016-01-11 12:23:08 +00:00
Rebecca Law
f951b364ac Actually use the mock in the test 2016-01-11 12:23:07 +00:00
Rebecca Law
eb78a77808 Added the mock for the admin_api_client 2016-01-11 12:23:07 +00:00
Rebecca Law
35619553c8 Added NoDataFoundException 2016-01-11 12:23:07 +00:00
Rebecca Law
a860f713d2 Implementation of the new_password endpoint.
Found a way to create the token that does not need to persist it to the database.
This requires proper error messages, written by people who speak menglis good.
2016-01-11 12:23:07 +00:00
Rebecca Law
8057a138a8 Update two_factor redirect endpoint 2016-01-11 12:23:07 +00:00
Rebecca Law
b5901a1ac7 New-password endpoints are implemented.
There should be a better way to validate the token.
2016-01-11 12:23:07 +00:00
Rebecca Law
f94966154d Fix code style. Remove duplicate endpoints 2016-01-11 12:23:07 +00:00
Rebecca Law
39970144b6 fix code style 2016-01-11 12:23:07 +00:00
Rebecca Law
2cb896fa81 Completion of forgot-password endpoints.
Start implementation for new-password endpoints.
Created PasswordResetToken model
ToDo: create and save token, send valid url to user,
check validity of token, update user's password, redirect to /two-factor.
2016-01-11 12:23:07 +00:00
Rebecca Law
6696426dbc Add endpoints for forgot-password. 2016-01-11 12:22:39 +00:00
Chris Hill-Scott
567ac123e3 Merge pull request #51 from alphagov/service-settings-flow
Add pages for service settings flow
2016-01-11 11:55:46 +00:00
Martyn Inglis
a1e484838e rolled back as didn't work :-( 2016-01-11 10:59:22 +00:00
Martyn Inglis
bd4829f451 Setting s3 etag to be git commit 2016-01-11 10:54:04 +00:00
Martyn Inglis
0369670f93 Setting s3 etag to be git commit 2016-01-11 10:49:04 +00:00
minglis
060093f30f Merge pull request #54 from alphagov/credstash-integration
Integrated credstash as a live properties setting in the app.py class
2016-01-11 10:11:24 +00:00