imdadahad
10f9dfde6e
Merge pull request #725 from alphagov/update-user-profile-endpoints
...
Refactor saving user profile
2016-11-11 11:24:31 +00:00
Imdad Ahad
8b64aa7e79
Use POST endpoint for updating a user attr
2016-11-10 12:07:29 +00:00
Chris Hill-Scott
988bf06132
Update error message for invalid email addresses
...
It has a trailing full stop since:
https://github.com/alphagov/notifications-utils/pull/76
2016-11-10 11:40:00 +00:00
Imdad Ahad
461d8a9b2c
Add separate endpoint to update a single user attr
2016-11-07 17:42:23 +00:00
Rebecca Law
9ffdf66c49
Rename the endpoints.
...
Increase test coverage to include the encrypted message sent to the task.
2016-10-13 11:59:47 +01:00
Rebecca Law
b37eef974c
Change email confirmation
...
- New endpoint to send a user an email to verify the email address when they want to change it.
2016-10-12 13:06:39 +01:00
Martyn Inglis
ce5b5fbf4c
Rationalised the queues.
...
- the internal notify activites (send sms code, forgotten passwords etc) all not in a "notify" queue.
- deleted all unused queues
2016-09-26 12:35:59 +01:00
Rebecca Law
7927901938
Fix indentation
2016-07-12 10:45:47 +01:00
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
abb9135e35
Password changed at is defaulted to the current date when the user is created.
...
This PR set the users.password_changed_at column to not be nullable.
2016-06-28 11:24:08 +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
b53fdf1f3f
Update python client to version 1.0.0.
...
This version of the client removed the request method, path and body from the encode and decode methods.
The biggest changes here is to the unit tests.
2016-05-04 16:08:23 +01:00
Nicholas Staples
c4b316bde6
Rebased migrations, all tests working.
2016-04-08 13:34:54 +01: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
114cfa6b17
Use the validation error message from the InvalidEmailError
2016-03-08 17:46:00 +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
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
ebec54cb80
Permission enums corrected, all tests passing.
2016-03-02 15:34:26 +00:00
Nicholas Staples
47c4368007
Merge with master.
2016-03-01 17:18:46 +00:00
Nicholas Staples
918d40cc9d
Functionality added and all tests working.
2016-03-01 14:21:28 +00:00
Nicholas Staples
7d43b4265f
Merge and fix conflicts.
2016-03-01 11:59:50 +00:00
Rebecca Law
ecbfbbc6b0
Fix bug in PermissionDAO
...
Refactor user/test_rest
Remove conftest/sample_admin_service
2016-03-01 10:34:27 +00:00
Nicholas Staples
47ac0b8a98
Fixed some tests.
2016-02-29 18:32:25 +00:00
Nicholas Staples
8ad13b6356
Manage template permission added. All tests passing.
2016-02-29 15:21:35 +00:00
Nicholas Staples
2cf2b51cd9
Fix for git commit review.
2016-02-29 11:50:43 +00:00
Nicholas Staples
9b73b0d9f8
Default permissions added on service creation. All tests working.
2016-02-26 17:11:30 +00:00
Nicholas Staples
75b9f77f92
user permissions now returned with the user object and all tests passing.
2016-02-26 15:57:24 +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
Nicholas Staples
180caf3ce6
Merge with master
...
.
2016-02-22 11:07:37 +00:00
Nicholas Staples
0396148853
Permissions added.
2016-02-19 14:47:45 +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
b5c662eca8
Change services.id to a UUID
...
Ideally all the primary keys in the db would be UUID in order to guarantee unique ids across distributed dbs.
This updates the services.id to a UUID. All the tables with a foreign key to the services.id are also updated.
The endpoints no longer state a data type of the <service_id> path param.
All the tests are updated to reflect this update.
The thing to pay attention to is the 0011_uuid_service_id.py migration script.
This commit must go with a commit on the notifications_admin app to keep things working.
There will be a small outage until both deploys have happened.
2016-02-02 14:22:22 +00:00
Nicholas Staples
66c1d858ac
Added support for allowing password to updated from the PUT request to the user rest endpoint.
2016-01-28 11:41:21 +00:00
Nicholas Staples
e1c8360fd1
Test fix.
2016-01-22 14:58:03 +00:00
Nicholas Staples
a9fe6ad469
Working code and tests.
2016-01-22 14:43:30 +00:00
Nicholas Staples
6b035cd324
All tests working, second time around.
2016-01-21 17:29:24 +00:00
Rebecca Law
0027b62224
Updated get_api_keys endpoint to return one or many given key_id or not.
2016-01-21 12:13:17 +00:00
Nicholas Staples
0ec69b89ee
Added user verify password endpoint.
2016-01-20 16:25:18 +00:00
Martyn Inglis
a56c7f59d3
Fixed test that had a clash on user ids
2016-01-19 13:59:45 +00:00
Adam Shimali
44824c9985
Update error message for password to match marshmallow errors.
2016-01-19 12:07:14 +00:00
Adam Shimali
f839bae1f5
Add rest of user model fields to api.
...
First step to moving user interactions to api.
2016-01-19 11:39:59 +00:00
Rebecca Law
5543e1b812
Remove views from test module
2016-01-18 11:19:22 +00:00