Commit Graph

17 Commits

Author SHA1 Message Date
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