100 Commits
Author SHA1 Message Date
Pea Tyczynska 7d5ca324d0 Merge pull request #4166 from alphagov/allow_user_delete_mobile_number
Let users on email auth delete their mobile numbers
2022-03-25 16:02:38 +00:00
Pea Tyczynska 190381c578 Make sure delete mobile number only shown when needed
Users who have no mobile number set, users who are not on email auth
and users who are not on "Change mobile number" page should not
see the delete link.
2022-03-25 15:49:03 +00:00
Pea Tyczynska 99682db7bf Change conditional for consistency 2022-03-22 17:55:55 +00:00
Pea Tyczynska eb0851e1e3 Please the navigation thing 2022-03-18 13:08:09 +00:00
Pea TyczynskaandBen Thorner ae4fc977c1 Apply suggestions from code review
Co-authored-by: Ben Thorner <benthorner@users.noreply.github.com>
2022-03-03 17:02:26 +00:00
Pea Tyczynska 8112930e24 Do not verify sms for pending users with email auth
This is to fix a bug where a user creates an account but doesn't
complete registration, then they are invited to a service that
changes their auth to email_auth, and then when they try to
complete registration they are still asked for sms code.

It should save users some pain, and reduce number of support tickets.
2022-03-03 17:02:26 +00:00
Pea Tyczynska 08f0393553 Allow platform admins to change user auth in the UI
So we do not have to go into the db when we need to change user
auth.

We do not allow this for users who use webauthn. We do not want to
enable security downgrade for those users.
2022-03-03 13:44:13 +00:00
Pea Tyczynska e1d1c5c3f5 Let users on email auth delete their mobile numbers
Sometimes users ask us to delete their mobile numbers for them.

If those users are on email auth, they should be able to
delete their number themselves.

This will save them writing a support ticket and save us
going into the database.
2022-02-23 18:31:00 +00:00
Pea Tyczynska ffb8549a21 Merge pull request #4137 from alphagov/rename_column_in_billing_report
Rename sms_fragments to sms_chargeable_units
2022-02-01 17:01:03 +00:00
Pea Tyczynska 9862acd7ee Hint that report is inclusive of both start date and end date
Bu changing labels for date input fields.
2022-02-01 16:48:05 +00:00
Pea Tyczynskaandkarlchillmaid feb2657040 Change formatting for guidance from list to table. Also rewrite
some of the guidance following content review.

Co-authored-by: karlchillmaid <karl.chillmaid@digital.cabinet-office.gov.uk>
2022-02-01 16:47:38 +00:00
Pea Tyczynska eadf32410b Add guidance to billing report page
Following a team cuddle where we checked how different people
interpret the billing report. We found that some things about
the report are ambiguous and that it would be helpful to have
some guidance on the page where the report can be downloaded,
2022-01-25 17:43:28 +00:00
Pea Tyczynska 2224eacf6b Merge pull request #4135 from alphagov/display_broadcast_cancelled_by_api
Display if broadcast was cancelled via API
2022-01-21 14:04:18 +00:00
Pea Tyczynska 78681eb452 Display if broadcast was cancelled via API
If broadcast_message has no value under cancelled_by_id, display
in the view that it was cancelled by an API call.
2022-01-19 11:01:03 +00:00
Pea Tyczynska f1d5c33fda Rename sms_fragments to sms_chargeable_units
This field caused some confusion and lots of unnecessary work
to our colleague because of unclear name.

The field was named sms_fragments, where in fact the value of
the field is: those sms fragments that go above free allowance
multiplied by the rate multiplier.

The new name was chosen through consultation with colleagues
who use billing report the most.
2022-01-18 18:05:07 +00:00
Pea Tyczynska 65241b11df Merge pull request #4106 from alphagov/revert-4080-remove-sms-allowance-remainder-org-report
Revert "Remove free text allowance remaining column from organisation report"
2021-12-29 10:16:16 +00:00
Pea Tyczynska e8876a0632 Make mocks more realistic
SMS remainder is never None, in practice it would be either 0 or
a natural number.
2021-12-22 17:31:01 +00:00
Pea Tyczynska 58fe9d5b56 Revert "Remove free text allowance remaining column from organisation report" 2021-12-21 16:05:29 +00:00
Pea Tyczynska ded7fa524f Merge pull request #4071 from alphagov/downloadable-org-use-report
Add downloadable report for org usage
2021-11-23 11:10:53 +00:00
Pea Tyczynska 47e303b8c3 Add downloadable report for org usage
This is so org level users can use this data easier for things
like determining spending per service.

We do not include sms fragments sent column and remove other sms columns

consistency.

Do not add sms fragments sent column for now until we agree on an
unambiguous name for it. The data in this column is sms billing units
multiplied by international sms weighing. My favourite for a clear
name would be 'text message credits used', but we need a naming
strategy for this.
2021-11-23 10:57:48 +00:00
Pea Tyczynska 00a629befc Link to downloadable report for org usage
Link is sticky so that it is easy to spot even when
an org has many services.
2021-11-17 17:58:06 +00:00
Pea Tyczynska c42fc071b5 Merge pull request #4020 from alphagov/update-service-name-hint-text
Add additional instructions for the service name
2021-09-14 12:18:46 +01:00
Pea Tyczynska af6b1d38b5 Merge pull request #3984 from alphagov/handle-cancel-letter-errors-from-api
Catch cancel_letter errors from API
2021-08-03 11:05:46 +01:00
Pea Tyczynska e1420e7ff7 Catch cancel_letter errors from API
When we catch such error, if the message is recognised,
show the message and redirect user to view_notification page.
2021-07-28 12:55:06 +01:00
Pea Tyczynska 61e52faaee Merge pull request #3962 from alphagov/fix-bug-conditional-multiline
Bump utils to revert a bug to conditional multiline placeholders
2021-07-09 14:05:46 +01:00
Pea Tyczynska 7f08ae7c29 Bump utils to revert a bug to conditional multiline placeholders 2021-07-09 13:51:39 +01:00
Pea Tyczynska 7930a53a58 Merge pull request #3935 from alphagov/more-detailed-request-go-live-ticket
Make a label more descriptive in request-to-go-live ticket
2021-06-18 10:01:50 +01:00
Pea Tyczynska d1dc1aec6c Make a label more descriptive in request-to-go-live ticket
We have a label saying "other live services". This label means
other live services for a user making the request, but it could
also be interpreted as other live services for an organisation.

Hence, we are changing the label to "other live services for
that user" to avoid confusion
2021-06-17 17:53:28 +01:00
Pea Tyczynska ac757b0fc1 Merge pull request #3904 from alphagov/platform-admin-reply-to
Let platform admins add or update service reply to email address without the need for verification.
2021-06-02 10:46:05 +01:00
Pea Tyczynska 4b3e826ec8 Let platform admins add or update service reply to email address
without the need for verification.

This is for when the email takes too long to arrive and the service
users cannot update it as a result.

A more streamlined solution has been proposed where we could send
a link in the verification email to the users and clicking that
link would add/update reply-email-to address.
That would require a bit more work so right now I am proposing this
as a quick stop gap so that we don't have to go to the database
manually to add the reply-to email address.
2021-05-28 15:06:31 +01:00
Pea Tyczynska a10304d9c6 Merge pull request #3892 from alphagov/update-remove-webauthn-cred
Let admin user update and delete their security key
2021-05-25 14:33:00 +01:00
Pea Tyczynska 04d1d97d4c Refactor loop to separate function and use user model
when getting a list of security keys

Also test separately that we are correctly choosing key out of list
of security keys. Previously we have done it as a part
of testing pages where where we were calling API to get a list
of keys, but then choosing one of those keys based on id.

Also remove redundant second test credential after PR review

Also remove redundant return value from mocks in update name tests
2021-05-25 14:17:58 +01:00
Pea Tyczynska 8501aa4ad6 Change name of the form and form field for consistency
Following PR review.

Also update function name for update name of security key in
user api client to be more specific.
2021-05-25 11:55:48 +01:00
Pea Tyczynska e384d3e0a1 Test all manage security keys pages against unauthorised access 2021-05-25 11:55:47 +01:00
Pea Tyczynska 724e345089 Do not call API if key name did not change
To avoid unnecessary calls to API.
2021-05-25 11:55:47 +01:00
Pea Tyczynska a907f261a5 Catch last credential error from API
When we are unable to delete security key because it's the last
one for that user, API throws an error. Here we catch that error
and display useful message to the user.

Use security key instead of webauthn credential

in user facing message - for consistency and readability.

We use security key term in user facing stuff and webauthn
credential in the code.
2021-05-25 11:55:37 +01:00
Pea Tyczynska a946ad6ec2 Let admin user delete their security key
Show confiem delete dialogue first to confirm if key should be deleted.
2021-05-25 11:40:42 +01:00
Pea Tyczynska 00c022eba5 Let admin user update their security key name 2021-05-25 11:40:41 +01:00
Pea Tyczynska 56eac279df Show manage security key page with name change form 2021-05-25 11:40:41 +01:00
Pea Tyczynska c33465e7cf Add link and placeholder view for managing a security key 2021-05-25 11:40:33 +01:00
Pea Tyczynska 714afff156 Merge pull request #3884 from alphagov/add-webauthn-as-auth-type
Add webauthn as an auth type
2021-05-13 14:32:03 +01:00
Pea Tyczynska 2a756f90d4 Add webauth as an auth type
When showing what auth type user uses to sign in, add a text
for users with webauthn.

On password change or sign in, throw not implemented error
if user uses webauthn auth.
2021-05-12 17:40:31 +01:00
Pea Tyczynska c55cc4574e Merge pull request #3854 from alphagov/admin-cancel-broadcast
Allow platform admins to cancel broadcasts.
2021-04-21 12:52:14 +01:00
Pea Tyczynska d77ec8a5ca Test that user without permission cannot reject broadcast 2021-04-20 17:27:56 +01:00
Pea Tyczynska 28378fdd3d Test that user without permission cannot accept broadcast
Also fix incorrect docstring.
2021-04-20 17:27:56 +01:00
Pea Tyczynska 6999d3bceb Refactor platform admin user fixtures
To make the code more DRY
2021-04-20 17:27:56 +01:00
Pea Tyczynska 0c0d9dd72f Admins won't see buttons for broadcast actions they can't do
These actions are creating, accepting and rejecting broadcasts.
2021-04-20 17:27:56 +01:00
Pea Tyczynska 002dd7485d Allow platform admins to cancel broadcasts.
Do not allow platform admins to:
- create broadcasts
- approve broadcasts
- reject broadcasts

that is, unless they have a send_messages permission
for a given service.

This is so platform admins have the minimum permissions necessary
to cancel a broadcast that might have been sent out accidentally.
2021-04-20 17:27:55 +01:00
Pea Tyczynska a22fb3eb4e Merge pull request #3839 from alphagov/billing-report
Transform usage report to billing report
2021-03-30 15:27:10 +01:00
Pea Tyczynska daba419b39 Fix tests - add flake8 exception and change endpoint name in navigation tests 2021-03-30 15:16:02 +01:00
Pea Tyczynska f7142a1518 Catch validation error from API
When dates chosen for billing report are not in the same
financial year, API throws an error. This error was not being
caught so far. This PR starts to catch it and display a banner
with error message on the page, instead of page crashing.
2021-03-30 14:13:57 +01:00
Pea Tyczynska 38cfee6390 Rename usage report to billing report
Because only services with bills to pay are included, and
we started including billing details.

Also rename endpoints and file names to match this.
2021-03-30 14:13:54 +01:00
Pea Tyczynska 95f46ced8a Add billing details fields to Usage for all services report 2021-03-30 14:11:42 +01:00
Pea Tyczynska 2a9ebfb1cc Merge pull request #3849 from alphagov/allow-double-hyphens-in-email-domains
Bump utils to allow double hyphens in email address domain
2021-03-30 11:06:14 +01:00
Pea Tyczynska a631942d55 Bump utils to allow double hyphens in email address domain
It was requested by our user and it is an allowed domain format
with Amazon SES, so we started allowing it in our validation.
2021-03-29 17:38:37 +01:00
Pea Tyczynska 0199709adb Merge pull request #3788 from alphagov/org-billing-details
View and edit notes and billing details for organisation
2021-02-16 15:31:43 +00:00
Pea Tyczynska 47f20ae438 Change content following content review 2021-02-16 15:20:15 +00:00
Pea Tyczynska 7c34a9bd46 Update pyaml 2021-02-16 14:48:43 +00:00
Pea Tyczynska 5a342b2a39 Test that only platform admins can update org notes 2021-02-16 14:46:14 +00:00
Pea Tyczynska d7596f81fb Add screen reader suffixes on all org settings
So screen reader users have consistent experience.
2021-02-16 14:46:14 +00:00
Pea Tyczynska 741beeb903 Add test case for when organisation notes do not change 2021-02-16 14:46:14 +00:00
Pea Tyczynska b2e4f76f94 Fix import order 2021-02-16 14:46:13 +00:00
Pea Tyczynska eb9e6e2c71 Update organisation billing details 2021-02-16 14:46:13 +00:00
Pea Tyczynska 36c72bb4cc View edit organisation billing details page 2021-02-16 14:46:13 +00:00
Pea Tyczynska f4dc2a173e Link to edit billing details page for organisation 2021-02-16 14:46:13 +00:00
Pea Tyczynska 8ea748f6e4 Update organisation notes 2021-02-16 14:46:12 +00:00
Pea Tyczynska e090d97997 View edit organisation notes page
Also fix page title for edit service notes page.
2021-02-16 14:46:12 +00:00
Pea Tyczynska 56b777872e Organisation billing details visible on organisation settings page 2021-02-16 14:46:12 +00:00
Pea Tyczynska f0d94a009e Organisation notes visible on organisation settings page 2021-02-16 14:46:11 +00:00
Pea Tyczynska 5bc229222b Merge pull request #3779 from alphagov/show-billing-details-for-service
Show billing details for service
2021-02-03 10:52:50 +00:00
Pea Tyczynska 25534dbee3 Remove 'billing' from option labels
They were unnecessary it turned out.
2021-02-03 10:30:02 +00:00
Pea TyczynskaandChris Hill-Scott 0f6cbdf27e Add extra spacing to billing details and remove unnecessary autofocus
Add more spacing between characters for billing reference number and PO number, so they are easier to read. 

Also remove unnecessary autofocus.

Co-authored-by: Chris Hill-Scott <me@quis.cc>
2021-02-03 10:30:02 +00:00
Pea Tyczynska c60be7000a Add notes to edit billing details page
As per ticket and as per Caley's request, so everything can be
edited together.

Also pluralise labels for billing contact info, to indicate
that putting multiple in is ok, and widen the input fields so
that it is more comfortable to input multiple contact details.
2021-02-03 10:30:02 +00:00
Pea Tyczynska 079f371bc5 Update attribute names following changes in API 2021-02-03 10:30:01 +00:00
Pea Tyczynska 8f21caa87a Change service billing details
View page that lets you change service billing details and
update details on form submission.
2021-02-03 10:30:01 +00:00
Pea Tyczynska 73031962a7 Change link leads to edit billing details view 2021-02-03 10:29:19 +00:00
Pea Tyczynska d82f90754f Fix permissions for edit service note page 2021-02-03 10:29:18 +00:00
Pea Tyczynska 4a7bfcc9c5 Add billing details property
This property lets service settings know if there are any
billing details to preview.
2021-02-03 10:29:18 +00:00
Pea Tyczynska 8219e5a2f9 Show billing details row for admins on service settings page 2021-02-03 10:29:18 +00:00
Pea Tyczynska f5e639050b Merge pull request #3784 from alphagov/notes-fix
Allow to update service notes
2021-02-02 17:37:27 +00:00
Pea Tyczynska 77008fe3cc Update requirements - install patch for jinja2 vulnerability 2021-02-02 17:13:18 +00:00
Pea Tyczynska 42b17d40b4 Test allowed attributes are really allowed 2021-02-02 16:38:56 +00:00
Pea Tyczynska 33dbfbaa65 Sort allowed attributes alphabetically 2021-02-01 17:36:04 +00:00
Pea Tyczynska f107fe260a Allow to update service notes 2021-02-01 17:13:53 +00:00
Pea Tyczynska e2ecff050d Merge pull request #3772 from alphagov/add-service-notes
Add service notes
2021-01-20 17:19:22 +00:00
Pea Tyczynska 5eb6ac2311 Add test for textarea
Also remove redundant error handling - if unexpected error happens,
it will be handled at the app level.
2021-01-19 18:25:52 +00:00
Pea TyczynskaandChris Hill-Scott 5ec49fc976 Refactor form instantiation
Form can be pre-filled with existing data upon instantiation.
WTForms will know not to do this on POST request.

Co-authored-by: Chris Hill-Scott <me@quis.cc>
2021-01-19 18:24:56 +00:00
Pea M. Tyczynska e6f15fb8b4 Merge pull request #3683 from alphagov/remove-unused-textbox-imports
Remove unused textbox imports
2020-10-16 10:48:12 +01:00
Pea M. Tyczynska b60d25da67 Merge pull request #3670 from alphagov/show-broadcast-tour-when-password-reset
Take user to page they are meant to visit in various sign-in flow scenarios
2020-10-12 12:27:37 +01:00
Pea M. Tyczynska f4f2e5d13a Merge pull request #3622 from alphagov/searchbox-make-autofocus-optional
Autofocus off by default on live-search
2020-09-29 10:58:00 +01:00
Pea M. Tyczynska 88a5fd56bf Merge pull request #3609 from alphagov/send-polygons-to-api
Send simple polygons to API along with areas
2020-09-08 12:23:12 +01:00
Pea M. Tyczynska 84e3a7ffd5 Merge pull request #3601 from alphagov/only-govt-users-can-be-invited-to-broadcast-services
Broadcast: only approved domain users can be invited
2020-08-28 15:04:50 +01:00
Pea M. Tyczynska a50ed17c14 Merge pull request #3582 from alphagov/fix-skiplink
Fix or remove skip links on bulk send and contact list upload pages
2020-08-20 10:23:36 +01:00
Pea M. Tyczynska 9b69d16963 Merge pull request #3554 from alphagov/convert-single-line-textboxes-to-govuk-frontend
Convert single line textboxes to govuk frontend
2020-08-18 11:29:44 +01:00
Pea M. Tyczynska 3bbce24b06 Merge pull request #3558 from alphagov/only-allow-new-template-if-permission-is-there
Services can only create templates of types they have turned on
2020-08-17 14:39:16 +01:00
Pea M. Tyczynska bad1e69cc3 Merge pull request #3499 from alphagov/hint-text-org
When changing service name, use organisation of the service for hint
2020-07-02 12:24:51 +01:00
Pea M. Tyczynska 0ad449883d Merge pull request #3484 from alphagov/add-service-name-hint-text-for-local-authorities
Add service name hint text for local authorities
2020-07-02 10:11:34 +01:00
Pea M. TyczynskaandChris Hill-Scott 1b2727197a Use en dashes for better formatting
Co-authored-by: Chris Hill-Scott <me@quis.cc>
2020-07-01 15:30:57 +01:00
Pea M. Tyczynska 33d749ab4c Merge pull request #3460 from alphagov/handle-session-expiring-name-change
Handle session expiring during service name change
2020-05-27 12:27:36 +01:00
Pea M. Tyczynska 33786fc3d9 Merge pull request #3423 from alphagov/update-healthcheck-page
Update _status page - remove references to Travis
2020-04-24 14:37:41 +01:00