Commit Graph

2492 Commits

Author SHA1 Message Date
Chris Hill-Scott
944a7d302c Fix logic for showing and hiding checkbox
The ‘make this default’ checkbox should be shown, except when:
- the user is adding their first email reply to address (because the
  first one has to be the default)
- they’re editing the existing default (because they can’t change it
  to be not default)
2019-06-05 16:41:06 +01:00
Chris Hill-Scott
bbbda5f968 Merge pull request #2994 from alphagov/let-trial-mode-services-be-archived
Let users archive their own trial mode services
2019-06-04 13:03:41 +01:00
Chris Hill-Scott
efb5b16948 Merge pull request #2997 from alphagov/org-settings-platform-admin-only
Make organisation settings platform admin only
2019-06-04 11:25:56 +01:00
Chris Hill-Scott
9f3cc8baf1 Only show ‘back to service’ for active services
When a user deletes their service we take them to the ‘Choose service’
page. Like other non-service-specific pages this has a link to the last
service you were looking at. But in this specific case the last service
you were looking at is the one you’ve just deleted. Which means the link
is confusing because:
- you thought the thing was ‘gone’
- we’ve secretly renamed it to ‘_archived Example service name’

So this commit hides the link in this specific case.
2019-06-04 09:50:02 +01:00
Chris Hill-Scott
954f43ae48 Let users archive their own trial mode services
At the moment we have a blanket rule that users can’t archive their own
services, to prevent someone accidentally deleting a real live service,
because that would be Very Bad.

But the tickets we get from users asking us to delete services are for
services they set up when they were just trying out Notify. There’s not
much harm in letting users delete these services, the consequences of
doing so are much lower than those of deleting a live service. And it
should mean fewer support tickets for us to deal with.
2019-06-04 09:45:51 +01:00
Chris Hill-Scott
6fc1635266 Rename some of the settings
This reflects the language we use for these things when talking about
them amongst ourselves.
2019-06-03 14:12:12 +01:00
Chris Hill-Scott
80e6c1654b Make organisation settings one table
There’s no longer a difference between regular settings and platform
admin settings – it’s all platform admin.
2019-06-03 14:12:12 +01:00
Chris Hill-Scott
647daa6ca4 Make organisation settings platform admin only
At the moment the only setting that a normal organisation team member
can change is the name of the organisation is its name. And we don’t
even want them to be able to change this. So this commit hides the
settings page entirely for non-platform-admin users.
2019-06-03 14:12:11 +01:00
Chris Hill-Scott
d9f885344c Remove domains that belong to an organisation
If a domain is already in our organisation list then we no longer need
to manually update it here. As part of this process I went and
proactively added some organisations, so I could remove more of them
from this file. I only did this where I could clearly determine from the
domain or a suppot ticket what the organisation was.
2019-06-03 13:21:29 +01:00
Chris Hill-Scott
5e76dbb6a7 Cache known domains in Redis
The domains lookup is a bit slow because it’s serialising all the
organisations in the database. Since we’re putting this in the sign up
flow it should feel snappy, so lets cache just the domain bit of it in
Redis.
2019-06-03 11:41:14 +01:00
Chris Hill-Scott
8835486d4e Look in organisation for whitelisted domains
At the moment we have to update a YAML file and deploy the change to get
a new domain whitelisted.

We already have a thing for adding new domains – the organisation stuff.

This commit extends the validation to look in the `domains` table on the
API if it can’t find anything in the YAML whitelist.

This has the advantage of:
- not having to deploy code to whitelist a new domain
- forcing us to create new organisations as they come along, so that
  users’ services automatically get allocated to the organisation once
  their domain is whitelisted
2019-06-03 11:41:13 +01:00
Pea (Malgorzata Tyczynska)
c55c2a2f56 Merge pull request #2993 from alphagov/fix_test_send_placeholders
Fix error where sending test message flow skipped first placeholder
2019-05-30 15:57:13 +01:00
Leo Hemsted
3a1282d03f Merge pull request #2987 from alphagov/org-trial-services
move trial mode services from org dashboard to separate page
2019-05-30 11:19:17 +01:00
Pea Tyczynska
4905be510f Update tests so they work with the fix 2019-05-29 16:56:55 +01:00
Pea Tyczynska
21ab8638b9 Fix error where sending test message flow skipped first placeholder
first way round and then collected placeholders again. Now the flow
collects all placeholders in one round.

Also fix the back link for step-1 for test flow so it goes back
to choosing recipient number

Also move operators around following flake8's advice :)
2019-05-29 16:56:55 +01:00
Leo Hemsted
4375c3d151 move to model based code layout 2019-05-28 16:46:12 +01:00
Leo Hemsted
9795f2b838 move trial mode services from org dashboard to separate page
the new page is platform admin only, and also has search built in
also, split test_organisation_invites into two files
2019-05-28 16:17:29 +01:00
Pea Tyczynska
4fd9e91993 Do not verify email when updated email address did not change 2019-05-24 11:22:20 +01:00
Pea Tyczynska
934bcb919f Reduce timeout to 45 seconds following analysis by Chris H-S:
"Failure is slower than success. So the longer a notification
takes to get a status, the more likely it is for that status
to be a failure anyway. This increases dramatically after 45 seconds.
The percentage of emails that go to delivered in less than 90 seconds
is 98.92%. To get to 99% we’d need to increase the timeout
to 178 seconds (3 minutes). We could still get 98.7% of notifications
by dropping the timeout to 45 seconds, and improve the experience
for notifications that are likely to fail by returning an error more quickly."
2019-05-23 15:34:25 +01:00
Pea Tyczynska
200fff6c66 Different back links and form actions on verify page depending if add or change 2019-05-23 15:34:25 +01:00
Pea Tyczynska
e406be3f80 Ensure that when updating reply-to email address old address is replaced
Also fix tests
2019-05-23 15:34:25 +01:00
Pea Tyczynska
3251fc4e00 Change content for email reply-to verification journey
Earlier commits used placeholder content while awaiting official
content.
2019-05-23 15:34:24 +01:00
Pea Tyczynska
441c1f441b Verify email address when editing reply-to address
Also fix the tests
2019-05-23 15:34:24 +01:00
Pea Tyczynska
431d2162c0 Fail reply-to email verification if no delivery within 5 minutes 2019-05-23 15:34:24 +01:00
Pea Tyczynska
ea314ad75f Deal with duplicate reply-to email addresses 2019-05-23 15:34:24 +01:00
Pea Tyczynska
8f3b560a4e Use ajax to auto-refresh reply-to email verifiaction page 2019-05-23 15:34:24 +01:00
Pea Tyczynska
9d2b60b56b Show try again link when email verification fails 2019-05-23 15:34:24 +01:00
Pea Tyczynska
ed599f0c03 Save new reply-to email if test notification delivered
Also check if it should be a default reply-to email address
2019-05-23 15:34:24 +01:00
Pea Tyczynska
45ac0d7812 Waiting page shows correct messages 2019-05-23 15:34:23 +01:00
Pea Tyczynska
d70afddf51 Send request to api to check if reply-to address is working 2019-05-23 15:34:23 +01:00
Chris Hill-Scott
238c56faec Merge pull request #2984 from alphagov/fix-double-heading-letter-branding
Fix duplicated H1 on ‘New letter branding’ page
2019-05-23 10:36:08 +01:00
Chris Hill-Scott
9d1a7904a8 Fix duplicated H1 on ‘New letter branding’ page
For accessibility reasons a page should have one (and only one) H1. This
commit fixes an instance where the H1 was duplicated as a result of the
work done to componentize our page headings.

It also adds an extra check to `client_request` so that we don’t
introduce pages with multiple or no H1s in the future.
2019-05-21 16:09:00 +01:00
Chris Hill-Scott
0609229466 Merge pull request #2982 from alphagov/terse-org-set-text
Make ‘you must set organisation’ text shorter
2019-05-21 15:24:27 +01:00
Chris Hill-Scott
ee33f91621 Use new ‘add’ buttons on branding management pages
‘Add’ buttons are generally:
- at the bottom of the page
- sticky
- grey
2019-05-21 14:19:29 +01:00
Chris Hill-Scott
9d40986d53 Make ‘you must set organisation’ text shorter
So it fits in the column.
2019-05-20 16:15:47 +01:00
Chris Hill-Scott
9dd1489d11 Merge pull request #2975 from alphagov/folder-summary-team-page
Folder summary team page
2019-05-17 14:30:20 +01:00
Chris Hill-Scott
fd7a33d0a6 Remove folder permissions feature flag from team members 2019-05-17 14:08:01 +01:00
Tom Byers
a0ecbe473e Merge pull request #2957 from alphagov/add-js-tests-for-list-entry
Add JS tests for list entry module
2019-05-17 13:36:52 +01:00
Alexey Bezhan
cab780b549 Remove edit_folder_permissions service setting (feature flag)
This removes the edit_folder_permission checks from the code, enabling
the folder permissions for all services.

This also fixes folder-related tests to set up appropriate user
permissions.

This should only be merged right after alphagov/notifications-api#2428,
when all other permission stories are done.
2019-05-17 11:20:16 +01:00
Chris Hill-Scott
81b299428f Add tests for editing folder permissions for platform admin users 2019-05-17 11:03:41 +01:00
Alexey Bezhan
5dbd229781 Hide template folder permission editing for platform admin users
Platform admin users can access all template folders, so the folder
permissions form always displays everything as checked for them,
which makes it look like the form isn't actually working. We could
do the check based on folder data, but the field still wouldn't
have any effect on permissions. So instead, we hide it completely
for platform admin users.

Submitting the form will remove any folder permissions from the DB
for the platform admin user (which can still be created by changing
permissions on the template folder 'Manage' page), but that's only
relevant if a user stops being a platform admin but keeps their
Notify services.
2019-05-17 10:46:56 +01:00
Tom Byers
b9a2cc1ec5 Add tests for listEntry.js 2019-05-16 15:36:47 +01:00
Tom Byers
293a7c544f Merge pull request #2972 from alphagov/un-revert-progressively-enhanced-folder-permissions
Add progressively enhanced folder permissions back
2019-05-16 11:45:39 +01:00
Katie Smith
5df3148610 Merge pull request #2954 from alphagov/support-welsh-characters
Allow Welsh characters in SMS templates
2019-05-15 16:34:02 +01:00
Chris Hill-Scott
61b056e490 Merge pull request #2964 from alphagov/different-back-link-from-job
Always go back to previous page from notification
2019-05-15 16:26:34 +01:00
Chris Hill-Scott
9c21541d2e Merge pull request #2955 from alphagov/auto-nhs-org-type
Set org type to NHS if user has NHS email address
2019-05-15 16:26:23 +01:00
Chris Hill-Scott
e6d03ec6f8 Check that users have to choose an org type
If we can’t guess a user’s organisation then they have to choose what
type of organisation they work for when they add a new service. This
commit adds a test to make sure they can’t just click the green button
and proceed without picking one.
2019-05-15 16:16:23 +01:00
Tom Byers
ccd09b9fd7 Revert "Merge pull request #2969 from alphagov/revert-2956-progressively-enhance-folder-permissions"
This reverts commit 8266f3d65c, reversing
changes made to b2a38fe222.
2019-05-15 14:26:51 +01:00
Katie Smith
5be6b41195 Allow Welsh characters in SMS
- This brings in the latest version of notifications-utils which
allows Welsh characters in SMS templates.
- Updated the pricing page to show the new prices for SMS with certain
Welsh characters
2019-05-15 14:20:49 +01:00
Chris Hill-Scott
4fc7498415 Include status when linking to notifications page
Without this argument the 'sending' filter doesn’t get highlighted by
default.
2019-05-15 10:04:43 +01:00