imdadahad
10f9dfde6e
Merge pull request #725 from alphagov/update-user-profile-endpoints
...
Refactor saving user profile
2016-11-11 11:24:31 +00:00
Rebecca Law
2e4fab1b55
Merge pull request #732 from alphagov/change-v2-error-resp
...
Change v2 error resp
2016-11-11 11:07:59 +00:00
Rebecca Law
488ba7a1ef
Remove import
2016-11-11 10:56:21 +00:00
Rebecca Law
b0d88e0888
Removed OrderedDict
...
Added missing assert in test
2016-11-11 10:50:38 +00:00
Chris Hill-Scott
d51c63cb6b
Merge pull request #722 from alphagov/whitepace-in-personalisation
...
Ignore case and whitespace in personalisation keys
2016-11-11 11:33:37 +01:00
Rebecca Law
c758694b98
Change validation error message to a string from a dict.
2016-11-10 16:30:51 +00:00
Rebecca Law
7d763260ce
Update format of the errors for DataError and exception
2016-11-10 14:53:39 +00:00
Rebecca Law
26d6a0c1a9
Merge branch 'master' into change-v2-error-resp
2016-11-10 14:21:20 +00:00
Leo Hemsted
abecb5ff98
Merge pull request #726 from alphagov/auth-500
...
update python client to 2.0.0
2016-11-10 13:47:34 +00:00
Leo Hemsted
dd004a6154
Merge pull request #727 from alphagov/exc-handl
...
remove 500/unplanned exception handlers in test
2016-11-10 13:47:13 +00:00
Imdad Ahad
f85ee54707
Refactor stuff + stricter validation for updating only ALLOWED user attrs
2016-11-10 13:09:25 +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
Chris Hill-Scott
8474344c9a
Ignore case and whitespace in personalisation keys
...
From a support ticket:
> it's possible to add a personalisation token with trailing whitespace
> (eg. "key " rather than "key"). Can this be trimmed in the UI to guard
> against this? (one of our devs copied and pasted it from a document
> and inadvertently included the space)
> Nothing major but caused a few hours of investigations!
Rather than trim the placeholder in the template, we should treat
placeholders in API calls the same way we do with CSV files, ie we
ignore case and spacing in the name of the placeholder. So
`(( First Name))` is equivalent to `((first_name))`, and both would be
populated with a dictionary like `{'firstName': 'Chris'}`.
Depends on:
- [x] https://github.com/alphagov/notifications-utils/pull/77
2016-11-10 11:40:00 +00:00
Rebecca Law
346d90e319
update V2 error response to
...
{status_code: 403,
errors: [error: AuthError, message: token has expired}]
}
2016-11-09 14:56:54 +00:00
Imdad Ahad
31dfc36094
Merge branch 'master' into update-user-profile-endpoints
2016-11-09 12:41:21 +00:00
Rebecca Law
78e84801bd
Merge branch 'master' into change-v2-error-resp
2016-11-08 15:59:42 +00:00
Imdad Ahad
34892694f3
Fix merge conflicts
2016-11-07 17:45:01 +00:00
Imdad Ahad
3f10e59db3
Add user dao method to update a single user attr
2016-11-07 17:42:39 +00:00
Imdad Ahad
461d8a9b2c
Add separate endpoint to update a single user attr
2016-11-07 17:42:23 +00:00
Imdad Ahad
8a126c7387
Add a schema to validate a single user attr 'strictly'
2016-11-07 17:41:49 +00:00
Chris Hill-Scott
bec20d3854
Merge pull request #728 from alphagov/case-insensitive-auth-header
...
Make bearer prefix on auth header case insensitive
2016-11-07 14:59:09 +01:00
imdadahad
273984a629
Merge pull request #729 from alphagov/logging-around-jobs-and-tasks
...
Added job id to logger
2016-11-07 12:00:48 +00:00
Martyn Inglis
15ba0a3eb1
Added job id to logger
2016-11-07 11:59:46 +00:00
Chris Hill-Scott
9248e72c50
Make bearer prefix on auth header case insensitive
...
From a support ticket:
> the "Bearer" prefix on the auth header is case sensitive. Can this be
> made case-insensitive?
Sure can 🙃
2016-11-07 10:49:05 +00:00
Leo Hemsted
f842a8c893
update test to pytest.raises instaed of assert response == 500
2016-11-04 17:04:51 +00:00
Leo Hemsted
ed187f7fad
remove 500/unplanned exception handlers in test
...
this means if your code throws an exception, in the test you'll see the full stack trace to help debugging
2016-11-04 16:37:55 +00:00
Leo Hemsted
f089b75129
update python client to 2.0.0
...
this is to prevent 500 errors because <2.0.0 raised AssertionError
if supplied JWT tokens were incorrectly formatted
tests added
2016-11-03 17:05:25 +00:00
Imdad Ahad
a41e7d5a2f
Add the right password check
2016-11-03 11:46:58 +00:00
Imdad Ahad
37c95b08b6
Refactor saving user profile
2016-11-03 11:11:51 +00:00
bandesz
edf22860e1
Bump boto version to 2.43.0-patch3
2016-11-02 17:59:09 +00:00
Rebecca Law
4cb38e2d12
Use status_code in error response.
...
Remove code.
2016-11-02 14:58:39 +00:00
Rebecca Law
db91a87fb2
Remove link from v2 error response
2016-11-02 14:48:15 +00:00
Rebecca Law
9f9ec28e2c
Merge pull request #724 from alphagov/post-sms-v2
...
Move jsonschema to requirements.txt to missing dependency
2016-11-02 14:16:27 +00:00
Rebecca Law
83f3c92c24
Move jsonschema to requirements.txt to missing dependency
2016-11-02 14:02:06 +00:00
Rebecca Law
58a010ae77
Merge pull request #721 from alphagov/post-sms-v2
...
Post sms v2
2016-11-02 13:38:42 +00:00
Rebecca Law
36ac00811d
Create dict for the fields in the error response.
2016-11-02 09:13:48 +00:00
Rebecca Law
e32978b72a
Merge branch 'master' into post-sms-v2
2016-11-02 09:08:26 +00:00
Rebecca Law
482d10545b
Improvements to the tests.
...
Update AuthError with a to_dict_v2 method.
2016-11-01 10:33:34 +00:00
Rebecca Law
a358f3cb3a
Error handler for schema validation errors
2016-10-31 15:43:11 +00:00
Chris Hill-Scott
5485252b85
Merge pull request #720 from alphagov/utils-bump-email-newline
...
Bump utils
2016-10-31 16:05:37 +01:00
Leo Hemsted
11cebb295c
Merge pull request #718 from alphagov/letters-flag
...
add can_send_letters flag to services
2016-10-31 14:46:25 +00:00
Rebecca Law
fc298367c5
Updated test_validators to test the contents of the error messages.
...
Added some tests to the test_post_notifications.
Added a errorhandler for AuthErrors.
This endpoint is not being used anywhere, however there is some common code being used in the v1 post endpoint. The only thing that may be affected is the error response, hopefully they are the same.
2016-10-31 12:22:26 +00:00
Chris Hill-Scott
9192ff137f
Bump utils
...
Includes:
- [ ] https://github.com/alphagov/notifications-utils/pull/75
2016-10-31 09:21:18 +00:00
imdadahad
250a14092c
Merge pull request #719 from alphagov/use-wheels-to-speed-as-deployment
...
Move wheel dependency installation to docker build
2016-10-28 17:54:39 +01:00
Imdad Ahad
ebe2ec4341
Install pip wheel in the dockerfile
2016-10-28 17:48:31 +01:00
Imdad Ahad
c8be8db742
Use venv for installation
2016-10-28 17:43:27 +01:00
Imdad Ahad
497f56bc81
Move wheel dependency installation to docker build
2016-10-28 17:27:37 +01:00
imdadahad
62303571ce
Merge pull request #717 from alphagov/use-wheels-to-speed-as-deployment
...
Use python wheels to speed up AS deployment
2016-10-28 17:15:23 +01:00
Rebecca Law
8cf2fc72a8
- Refactor version 1 of post notificaitons to use the common persist_notificaiton and send_notification_to_queue methods.
...
- It would be nice to refactor the send_sms and send_email tasks to use these common functions as well, that way I can get rid of the new Notifications.from_v2_api_request method.
- Still not happy with the format of the errors. Would like to find a happy place, where the message is descript enough that we do not need external documentation to explain the error. Perhaps we still only need documentation to explain the trial mode concept.
2016-10-28 17:10:00 +01:00