Rebecca Law
f4976539e4
Make email a required field for the email_data_schema.
2016-07-08 10:57:20 +01:00
Rebecca Law
36ecdca04c
Add new email template for the GOV.UK Notify service, to send an email to users that register with the same email address.
...
Add a new endpoint to send the email.
2016-07-07 17:23:07 +01:00
Rebecca Law
3f11447bc8
A small refactor to use the SMS_TYPE and EMAIL_TYPE in code rather that 'sms' or 'email'
2016-06-30 15:41:51 +01:00
Rebecca Law
4e640eea6d
Remove print
2016-06-17 11:01:26 +01:00
Rebecca Law
b6c6b25032
Use the send email task to send the password reset and invitation email.
...
Next PR can remove those tasks.
2016-06-16 17:34:33 +01:00
Rebecca Law
d6e920fa89
Use GOV.UK Notify service to send the forgot password email link using the template to create the message.
2016-06-16 10:43:41 +01:00
Adam Shimali
b33312b855
Change endpoint responses where there are marshalling, unmarshalling
...
or param errors to raise invalid data exception. That will cause
those responses to be handled in by errors.py, which will log
the errors.
Set most of schemas to strict mode so that marshmallow will raise
exception rather than checking for errors in return tuple from load.
Added handler to errors.py for marshmallow validation errors.
2016-06-15 14:37:51 +01:00
Rebecca Law
a6ce109c62
Rename first send_email to send_email_v1.
...
Fix the tests
2016-06-13 16:16:56 +01:00
Rebecca Law
cd2627e5ed
Create a new task called send_email_v2 so that I can get rid of the from_address in the signature.
...
This is done to make sure we do not lose any messages in the queue during deployment.
2016-06-13 15:31:45 +01:00
Rebecca Law
5fc14940f3
Let the send_email task set the from address
2016-06-13 14:58:00 +01:00
Rebecca Law
ea80596e73
Correct template id for email verification template in the history table.
...
Correct personalisation name when sending registration message.
2016-06-13 14:57:59 +01:00
Rebecca Law
877fd6fdc4
Make template id a string in the json messge
2016-06-13 14:57:59 +01:00
Rebecca Law
cfd31541f4
Use notify to send email verification
2016-06-13 14:57:41 +01:00
Adam Shimali
e28ef237e4
When adding a user new with permissions to a service, the permissions
...
dao was deleting all permissions for that user (regardless of service
id) as the last filter on the permissions dao get_query method won.
I've added a replace flag to the set_user_service_permission method
so that it can handle adding new users + permissions and editing
of existing users' permissions.
Also by pass the get_query method until it can be refactored to work
correctly.
For now execute the filter query directly on the model.
2016-06-07 16:35:26 +01:00
Rebecca Law
dbc57e3b58
[WIP]
...
use send_sms task to send sms code.
Tests are broken because the template data for the Notify service is being delete after every test. Need a way to seed the data for the test.
2016-06-03 15:15:46 +01:00
Nicholas Staples
03f15d6af9
Update now to utcnow. All tests passing.
2016-05-11 10:56:24 +01:00
Chris Hill-Scott
eeaeacbf0b
Remove send email code task
...
We don’t send email codes any more
2016-04-26 08:55:09 +01:00
Nicholas Staples
1b76646170
Working placeholders in subject with upgraded notifications-utils.
...
Fix test.
2016-04-13 15:53:27 +01:00
Nicholas Staples
c4b316bde6
Rebased migrations, all tests working.
2016-04-08 13:34:54 +01:00
Nicholas Staples
3a59c75257
Transaction management added for one example. All tests passing.
2016-03-23 16:30:47 +00:00
Adam Shimali
2d1d883283
Added task for sending email verification links out on intial
...
registration.
Left original email code endpoint in as it is still used for things like
email change.
2016-03-17 15:21:04 +00:00
Rebecca Law
123b0ead3a
Replaced first queries with one queries, which throws a NoResultFound.
...
Able to remove many of the None checks as a result of this.
Fixed the tests were needed.
2016-03-11 15:34:20 +00:00
Rebecca Law
e055590b07
Changed db queries to use one, which throws NoResultFound exception, this exception is dealt with in our error handlers.
...
Now a lot of the if none checks can be removed.
2016-03-11 12:39:55 +00:00
Rebecca Law
6e17a015e8
Add missing import
2016-03-08 15:20:34 +00:00
Rebecca Law
d840b8d689
Merge branch 'master' into reset-password
2016-03-08 15:05:18 +00:00
Rebecca Law
ba337374fd
- Remove password_changed_at from the update_dict in users_dao
...
- Format dates in UserSchema
- Properly formatted subject and message body for the password reset email
- Add name to the message for reset password
2016-03-08 14:33:06 +00:00
Rebecca Law
5c4ac9d938
Include token creation date in the url token.
2016-03-07 18:20:20 +00:00
Rebecca Law
10296f0cc2
Send email address in the data rather than the user_id as a path param.
...
Remove unused OldRequestVerifyCodeSchema.
2016-03-07 15:21:05 +00:00
Martyn Inglis
4f8c2d31a5
Capture logged in at when password is verified
2016-03-07 15:01:40 +00:00
Rebecca Law
b15d3434c3
Added an endpoint and celery task to email a reset password url.
2016-03-07 14:34:53 +00:00
Nicholas Staples
c80753bb75
Fix url for user service permissions.
2016-03-03 09:59:21 +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
Rebecca Law
6a739d5ec9
Remove celery_queues from config.
...
Removed unused endpoint.
2016-03-02 13:15:23 +00:00
Nicholas Staples
918d40cc9d
Functionality added and all tests working.
2016-03-01 14:21:28 +00:00
Nicholas Staples
16e1ecb134
Working permissions and all tests passing.
...
Remove print statements.
Fix for review comments.
2016-02-26 15:00:29 +00:00
Adam Shimali
21e791b25c
Add endpoint for getting user by email address
2016-02-23 11:03:59 +00:00
Martyn Inglis
530c8a2faa
Fixed merge issues
2016-02-22 13:27:47 +00:00
Martyn Inglis
886b206d63
Merge branch 'master' into email-templates
...
Conflicts:
app/user/rest.py
tests/app/user/test_rest.py
2016-02-22 13:12:24 +00:00
Martyn Inglis
cc720b137f
Merge branch 'master' into email-templates
...
Conflicts:
app/user/rest.py
2016-02-19 17:33:28 +00:00
Martyn Inglis
98314485d3
Generate the email_from from the service name.
2016-02-19 17:07:59 +00:00
Martyn Inglis
dc294c32ae
Fix all other dependant classes that are affected by the DAO / Service / Model changes
2016-02-19 15:54:11 +00:00
Rebecca Law
17d14f291e
Refactor user/<user_id>/code into two endpoints.
...
- Created new endpoint user/<user_id>/sms-code to send the sms verification code to the user.
- Create new endpoirtn user/<user_id>/email-code to send the email verifcation code to the user.
- Marked the old methods, schema, tests with a TODO to be deleted when the admin app is no longer sending messages to /user/<user_id>/code
- Added error handlers for DataError and NoResultFound. Data error catches invalid input errors.
- Added error handler for SqlAlchemyError which catches any other database errors.
- Removed the need for the try catches around the db calls in the user endpoints with the addition of the db error handlers.
- We may want to wrap db excpetions in the dao, if we want the No results found message to be more specific and say no result found for user.
2016-02-19 11:37:35 +00:00
Rebecca Law
9ea2acfdae
Use dashes in the celery queue names
2016-02-18 11:18:35 +00:00
minglis
9b99782662
Merge pull request #83 from alphagov/celery-send-email-code
...
Celery send email code
2016-02-18 11:03:23 +00:00
Rebecca Law
4d9d511575
Merge pull request #81 from alphagov/celery-send-sms-code
...
Use Celery to send sms code
2016-02-18 10:51:16 +00:00
Rebecca Law
3ce6758f3e
Change names for clarity sake.
...
Rename test.
What we do when the validation_code fails to send is still to be decided.
2016-02-18 09:59:18 +00:00
Rebecca Law
c1df61a7d4
Use celery to send the email verification code.
2016-02-18 09:52:27 +00:00
Rebecca Law
9073814d9f
I have an issue with the test, not sure why?
2016-02-17 17:48:23 +00:00
Adam Shimali
4f33b6f406
Wire up error handlers.
...
Replace some 400s with more appropriate 500s.
DAO methods that cause unexpected exceptions get caught and
logged by errors.py 500 error handler.
2016-02-17 17:04:50 +00:00
Rebecca Law
d022d036dc
Celery task to send the sms verify code.
...
Each celery task will use it's own queue.
2016-02-17 15:41:33 +00:00