Commit Graph

3176 Commits

Author SHA1 Message Date
Chris Hill-Scott
ee83a645fe Merge pull request #1150 from alphagov/page-title-fixes-missed
Fix page titles that didn’t get fixed before
2017-02-23 16:44:57 +00:00
Chris Hill-Scott
40d44913b0 Merge pull request #1149 from alphagov/form-autocomplete-off
Convert all instances of autocomplete to `off`
2017-02-23 16:44:51 +00:00
Chris Hill-Scott
d84a5d4ef2 Merge pull request #1148 from alphagov/fix-html-entity-permissions
Remove HTML entity from permission choice
2017-02-23 16:44:41 +00:00
Chris Hill-Scott
d96c5c36fc Merge pull request #1147 from alphagov/fix-spacing-invite-confirmation
Fix spacing with heading/banner combination
2017-02-23 16:44:33 +00:00
Chris Hill-Scott
f64672e23b Fix page titles that didn’t get fixed before
Did most of this work in:
https://github.com/alphagov/notifications-admin/pull/1118

> In pages specific to a service (e.g. dashboard and sub pages) the
> title needs to distinguish which service it applies to. This is mainly
> to give context to screen reader users who could be managing multiple
> services.
>
> Implementing this uses template inheritance:
>
> `page_title` includes `per_page_title` includes `service_page_title`
>
> ‘GOV.UK Notify’ is inserted into every page title.
>
> Pages that set `service_page_title` get the service name inserted too.
2017-02-23 15:34:13 +00:00
Chris Hill-Scott
54d38faad2 Convert all instances of autocomplete to off
`on` or `off` are the only valid values.

> The attribute, if present, must have a value that is an ASCII
> case-insensitive match for the string "off", or a single token that
> is an ASCII case-insensitive match for the string "on"

– https://www.w3.org/TR/html5/forms.html#autofilling-form-controls:-the-autocomplete-attribute
2017-02-23 15:26:09 +00:00
Chris Hill-Scott
d18334100e Remove HTML entity from permission choice
Not sure why we had a non-breaking space in here because it didn’t wrap
onto two lines anyway. And it wasn’t working because it was showing up
encoded, rather than as a raw entity.
2017-02-23 10:50:28 +00:00
Chris Hill-Scott
f53127c54f Fix spacing with heading/banner combination
Our CSS adjusts the spacing for the first `.heading-large` on the page
so that it aligns with the navigation. This doesn’t work when something
else comes first on the page, like a notification banner.

But since we only ever user `.heading-large` for the `<h1>`, and there
should only be one `<h1>` on the page we can just change the spacing
for _all_ `<h1>`s.
2017-02-23 10:39:26 +00:00
Pete Herlihy
aad891d4ce Merge pull request #1144 from alphagov/30-32-services
Added Census and NCSC services to counts
2017-02-21 14:58:26 +00:00
Pete Herlihy
c65c9ba2b3 Added Census and NCSC services to counts 2017-02-21 14:44:14 +00:00
Chris Hill-Scott
9b9bcd5954 Merge pull request #1143 from alphagov/feat-make-two-factor-use-new-update-password-endpoint
Update two-factor to use new update password endpoint and refactor tests
2017-02-20 15:25:36 +00:00
Chris Hill-Scott
d043536aaf Merge pull request #1141 from alphagov/fix-codedeploy-artifact
Remove old target directory and include any dotfiles in the zip
2017-02-20 15:25:30 +00:00
Chris Hill-Scott
5fe239ffcd Merge pull request #1138 from alphagov/remove-unused-templates
remove old unused files
2017-02-20 15:12:45 +00:00
Chris Hill-Scott
0657b688fa Merge pull request #1139 from alphagov/proposition-image-meets-colour-contrast
Make proposition image meet colour contrast
2017-02-20 15:08:24 +00:00
Imdad Ahad
5017267210 Remove reset failed count 2017-02-20 15:07:37 +00:00
Imdad Ahad
2c51792ae5 Update two-factor to use new update password endpoint and refactor tests 2017-02-20 14:55:28 +00:00
Leo Hemsted
a7335ddb33 Merge pull request #1140 from alphagov/session-timeout
set session timeout to 20 hours
2017-02-20 13:31:53 +00:00
Leo Hemsted
a7defa83b8 Merge pull request #1133 from alphagov/gsm
Don't let users add non-GSMish characters to sms templates
2017-02-20 13:31:13 +00:00
bandesz
41210a9d2b Add cf-rollback-with-docker Make task 2017-02-20 13:23:55 +00:00
Leo Hemsted
efd976e32e downgrade non-gsm chars in SMS previews
bump utils to 13.8.0

we still save the content as the user intended, and they'll still see
that content in the text field if they go to edit the template, but
the SMS previews will appear as they will on a user's phone
2017-02-20 12:03:16 +00:00
Imdad Ahad
f355e7e50b Remove old target directory and include any dotfiles in the zip 2017-02-20 11:38:08 +00:00
Leo Hemsted
9818a95785 set session timeout to 20 hours
this way if someone does some work in the evening, when they come in next morning
they'll still be logged in. but if someone does stuff in the morning and then leaves
notify, they'll be kicked out by the next day

unless they have an auto-refreshing page like the dashboard open
2017-02-20 11:31:41 +00:00
Chris Hill-Scott
fea7758eaf Merge branch 'master' into gsm 2017-02-20 10:14:33 +00:00
Chris Hill-Scott
e3dd8fd018 Make proposition image meet colour contrast
The message text in our previous illustration was white on light blue,
which didn’t meet WCAG AA colour contrast. WCAG AA requires a contrast
ratio of 4.5:1. The text in our image was only 3.8:1.

The text in this new image has a contrast ratio of 19.8:1, so easily
passes WCAG AAA.

Required a slight tweak to the positioning of the image because it’s
dimensions weren’t exactly the same as the previous one.
2017-02-20 09:32:49 +00:00
Chris Hill-Scott
1f679a95be Merge pull request #1137 from alphagov/bump-utils-no-markdown-links
Bump utils to turn off Markdown links
2017-02-17 16:29:40 +00:00
Leo Hemsted
df8532beee sorry old chris, we don't need these anymore 2017-02-17 15:45:53 +00:00
Leo Hemsted
f550699daf fix non-gsm error message
Use `it`/`they` depending on how many different characters you've used
Also don't wrap the message with quotes, as it looks confusing and
potentialy implies that you can't use apostrophes
2017-02-17 10:39:52 +00:00
Leo Hemsted
9046ec3bbc ensure emails still accept emoji 2017-02-17 10:39:52 +00:00
Leo Hemsted
6f8568b904 add tests for gsm handling in save/edit template 2017-02-17 10:39:52 +00:00
Leo Hemsted
73a965a3c6 allow downgradeable unicode characters in SMS templates 2017-02-17 10:39:52 +00:00
Leo Hemsted
c25fff9032 add tests for formatted_list 2017-02-17 10:39:52 +00:00
Leo Hemsted
41fa158635 error when users put non-GSM chars in a sms template
additionally, this moves the formatted_list jinja macro into a python
function, so that it can be called from the form validator
2017-02-17 10:39:52 +00:00
Leo Hemsted
cb54db82b4 Merge pull request #1128 from alphagov/test-permission-fix
Fix permissions in tests
2017-02-17 10:39:32 +00:00
Leo Hemsted
05e3a61f9b fix additional test permissions 2017-02-17 09:57:58 +00:00
Leo Hemsted
bbeb3595a8 update tests to work with new correct logged_in_client fixtures
mostly making sure that the correct user is set up. some minor changes,
such as giving the platform_admin service permissions (so that we can
test that platform admins can send letters)
2017-02-17 09:44:53 +00:00
Leo Hemsted
61cbdac09d remove mock_has_permissions from logged_in_client
mock_has_permissions blindly returns True - this is useful for the
decorators on most endpoints checking if the user has permission to
access endpoints about the provided service, but is not useful when
it returns true to such checks as "if user is platform admin, show
secret stuff", despite the logged in user being
"active_user_with_permissions" rather than a platform admin.

So remove this, and add "logged_in_platform_admin_client" for when we
want to explicitly check platform admin functionality.

This has the advantage of the actual permissions code being checked
in tests, so the test environment is more consistent with the real
world.

Several tests will have to change now though - active_user_with_perms
has permissions for service_one, so most tests should now call
client.get(url_for(..., service_id=service_one['id']) or they'll 403
2017-02-17 09:44:53 +00:00
Chris Hill-Scott
7a3fb4d2a9 Bump utils to turn off Markdown links 2017-02-16 21:18:27 +00:00
Andras Ferencz-Szabo
af1befe248 Merge pull request #1130 from alphagov/paas_awslogs
Add awslogs logging for PaaS
2017-02-16 17:20:20 +00:00
Chris Hill-Scott
221d401289 Merge pull request #1136 from alphagov/sign-in-message
Show a more useful message if you get signed out
2017-02-16 15:33:33 +00:00
Chris Hill-Scott
6977afb703 Merge pull request #1135 from alphagov/fix-recipient-column-error
Fix error message when recipient column missing
2017-02-16 15:33:24 +00:00
bandesz
b148a0a6a0 Add awslogs logging for PaaS 2017-02-16 14:19:37 +00:00
Chris Hill-Scott
fb33255bd0 Show a more useful message if you get signed out
> Users that allow their session to expire, or access a bookmarked link
> are told they need to "Sign in to access this page" - we should
> explain that it's because they've been away a while, so that they
> understand why they're being asked to log in again.

– https://www.pivotaltracker.com/story/show/140016919

The message we were showing before (Please log in to access this page is
the default message from Flask Login).

In order to stop this flash message from appearing, we need to override
the default handler for when a user is unauthorised. We’re overriding it
with the same behaviour, minus the flash message.

If you navigate deliberately to the sign in page it’s unchanged.

Content is Sheryll-approved.
2017-02-16 13:33:32 +00:00
Leo Hemsted
492f8bee0f Merge pull request #1134 from alphagov/strong-2fa-security
Strong 2fa security
2017-02-16 13:11:48 +00:00
Chris Hill-Scott
176d0f4867 Fix error message when recipient column missing
When your CSV file is missing the recipient column (eg ‘phone number’
or ‘email address’) we give you a helpful error message telling you that
this is the case.

When we changed the recipient column to be columns, plural, we didn’t
update the code that generated the error message. So you would get
errors that looked this like this:

> Your file needs to have a column called ‘’

This commit fixes the error message.
2017-02-16 11:12:34 +00:00
imdadahad
c8a05df586 Merge pull request #1126 from alphagov/fix-clear-instance-before-deploy
Remove app and py3 packages on codedeploy-ment
2017-02-15 16:54:52 +00:00
Rebecca Law
fc66d62c3f Merge branch 'master' into strong-2fa-security 2017-02-15 16:11:48 +00:00
Rebecca Law
cf3a933b1e Updated error message is the code is not the right size or data type.
Updated two_factor to error is the user account is locked (locked = over 10 failed_login_count)
2017-02-15 14:56:22 +00:00
Chris Hill-Scott
3e18d13ca2 Merge pull request #1132 from alphagov/fix-single-template-usage
Don’t right align template stats for one template
2017-02-15 14:10:52 +00:00
Chris Hill-Scott
6404997b93 Don’t right align template stats for one template
We don’t show the graph if a user has only used one template.
2017-02-15 14:01:52 +00:00
Chris Hill-Scott
f851da36f7 Merge pull request #1131 from alphagov/fix-template-graph-width
Make template usage graph take up 100% of width
2017-02-15 13:46:50 +00:00