Rebecca Law
8bcaf7741d
Merge pull request #98 from alphagov/invite-user-2
...
[WIP] added dao and rest endpoint for retrieving invited users
2016-02-25 14:00:27 +00:00
Adam Shimali
3b11cfc8e5
Fix for intermittent failure
2016-02-25 12:27:42 +00:00
Adam Shimali
99c9cd608c
[WIP] changed dao query to use .first and return specific not found
...
error message from rest view method.
2016-02-25 12:13:25 +00:00
Adam Shimali
883ad02c25
[WIP] added dao and rest endpoint for retrieving invited users
...
by service and by id.
2016-02-25 11:22:36 +00:00
NIcholas Staples
064fec5ad5
Merge pull request #95 from alphagov/get-users-for-service
...
New endpoint to get users for service id.
2016-02-24 14:29:39 +00:00
Rebecca Law
61ff317126
Merge pull request #97 from alphagov/invite-user
...
[WIP] added endpoint and dao to create invites for users.
2016-02-24 14:28:30 +00:00
Adam Shimali
e6fe10cbdc
[WIP] added endpoint and dao to create invites for users.
...
Droped token as later code to send email invite can generate
timebased url to send to user. That can then be checked
against configurable time threshold for expiry. Therefore
no need to store a token.
2016-02-24 14:18:56 +00:00
Rebecca Law
f1fdfbb308
Return empty list when there are no users for the service.
...
Added a test for when there are no users for the service.
Added a test_url_for - do we want to add this test and use url_for in our tests?
Or explictly write the url in the test?
2016-02-24 10:30:00 +00:00
Rebecca Law
12a2d8db0a
New endpoint to get users for service id.
...
/service/<service_id>/users returns a list of all users associated with the service
2016-02-23 17:53:54 +00:00
NIcholas Staples
fb0e17a7db
Merge pull request #94 from alphagov/user-invite
...
[WIP] Add model class and migration script for invited user.
2016-02-23 16:55:07 +00:00
Adam Shimali
c02b304d1e
Add model class and migration script for invited user.
2016-02-23 16:46:39 +00:00
NIcholas Staples
8de4ae5cf2
Merge pull request #91 from alphagov/send-email-from-templates
...
Send Email via the API
2016-02-23 13:18:45 +00:00
Martyn Inglis
c694dae933
Refactored to make email and sms template check the same
2016-02-23 12:35:28 +00:00
Adam Shimali
503782cfc2
Add celery run to readme
2016-02-23 12:28:10 +00:00
NIcholas Staples
57e1178597
Merge pull request #92 from alphagov/user-by-email
...
Add endpoint for getting user by email address
2016-02-23 11:19:49 +00:00
Adam Shimali
21e791b25c
Add endpoint for getting user by email address
2016-02-23 11:03:59 +00:00
Martyn Inglis
b01782bbe6
Send Email via the API
...
- uses the new subject/email from fields present on the templates / service tables
- brings the send email api call into line with the sms one.
- same fields (to/template_id)
- same rules regarding restricted services
- wired in as a task into celery
Requires
- new celery queue
- new env property (NOTIFY_EMAIL_DOMAIN)
2016-02-22 17:17:29 +00:00
minglis
316bf0296d
Merge pull request #90 from alphagov/fix-migration
...
Fix migration script for existing jobs
2016-02-22 16:02:26 +00:00
Adam Shimali
a143b9492c
Fix migration script for existing jobs
2016-02-22 15:51:38 +00:00
NIcholas Staples
0876ff99e0
Merge pull request #89 from alphagov/job-metadata
...
Job metadata
2016-02-22 15:10:02 +00:00
Adam Shimali
5d2a3bdc31
Fixed clashing migration file number
2016-02-22 15:02:01 +00:00
Adam Shimali
c36b64c91b
Added notification count to jobs.
2016-02-22 14:57:33 +00:00
Adam Shimali
945df9dca7
Merge pull request #87 from alphagov/email-templates-part-2
...
Email templates part 2
2016-02-22 14:54:27 +00:00
Martyn Inglis
dbe914f401
Changed error format on template subject duplication error
2016-02-22 14:32:41 +00:00
Martyn Inglis
b3b3cca65f
Merge branch 'master' into email-templates-part-2
2016-02-22 14:04:01 +00:00
Adam Shimali
71bfaa3c10
Merge pull request #86 from alphagov/email-templates
...
Email templates
2016-02-22 13:33:24 +00:00
Martyn Inglis
530c8a2faa
Fixed merge issues
2016-02-22 13:27:47 +00:00
Martyn Inglis
2c51535b7e
Merge branch 'master' into email-templates
2016-02-22 13:12:41 +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
minglis
00bd4da0f0
Merge pull request #88 from alphagov/fix_send_email_code
...
Fixes added.
2016-02-22 13:10:46 +00:00
Nicholas Staples
c8bb96b883
Fixes added.
2016-02-22 13:02:09 +00:00
Martyn Inglis
9bb95a53ec
Updates to template endpoints:
...
- moved into templates rest class
- updated dao
- removed delete methods
- constraint on subject line
2016-02-22 12:55:18 +00:00
Adam Shimali
4516dc4331
Merge pull request #85 from alphagov/add_permissions_to_models
...
Permissions added.
2016-02-22 11:14:14 +00:00
Nicholas Staples
180caf3ce6
Merge with master
...
.
2016-02-22 11:07:37 +00:00
Adam Shimali
25f57523a0
Merge pull request #84 from alphagov/refactor-user-rest
...
Refactor user/<user_id>/code into two endpoints.
2016-02-22 10:05:53 +00:00
Martyn Inglis
443691402f
Slight tiny up of templates_dao
...
- 1 method per get query
- logic around create/update removed
2016-02-22 09:46:16 +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
Rebecca Law
04ca1bc00f
Remove code_type
2016-02-19 16:06:45 +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
Martyn Inglis
1a136885c3
Update service rest class to handle new fields and updated dao
2016-02-19 15:53:45 +00:00
Martyn Inglis
5bfae689c2
Refactored the services dao to be a little cleaner
...
- some things we don't need
- bulk update of users
- delete service
Now returns None if can't find an object
2016-02-19 15:53:15 +00:00
Martyn Inglis
f8ac14ea30
Update model
...
- adds email_from field to the service model
- adds subject_line to the template model
These are unique and not null fields, so there is a migration here for email_from to populate it.
2016-02-19 15:52:19 +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
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
aff948e9ca
Merge branch 'celery-send-sms-code' into celery-send-email-code
...
Conflicts:
app/celery/tasks.py
app/user/rest.py
scripts/run_celery.sh
2016-02-18 10:50:14 +00:00
Rebecca Law
b286b4356c
Update queue name with dashes
2016-02-18 10:45:25 +00:00