Commit Graph

7170 Commits

Author SHA1 Message Date
Leo Hemsted
dc5c3ba2b8 services-or-dashboard (name TBD) now redirects to orgs too
if there's a service in the session, go there.
if there's an org in the session, go there.
if the user has one service and no orgs, go there.
if the user has one org and no services, go there.
else go to choose service page
2018-03-14 15:39:55 +00:00
Leo Hemsted
b37613cbc6 show organisations on the choose-service page (name TBD)
layout as follows

```
ORG_1
  SERVICE_1
  SERVICE_2
--------------------
ORG_2
--------------------
SERVICE_3
SERVICE_4
--------------------
Add a new service...
```

* org 1 and 2 are organisations that the user has access to.
* Service 1 and 2 are part of org 1, AND the user has access to them.
  - There may be more services in org_1 that the user doesn't know
    about.
* Service 3 and 4 are services the user has access to.
  - They MAY be part of an organisation that the user does not know
    about. They can't be part of org_1 or org_2 tho.
2018-03-14 15:39:55 +00:00
Leo Hemsted
ee665caa7d get orgs and services from user
this endpoint should probably only be used for the choose-service page
also create an OrganisationBrowsableItem to aid rendering of them
in the front-end.
2018-03-14 15:39:55 +00:00
Leo Hemsted
4edd990bc7 order imports 2018-03-14 15:39:55 +00:00
Leo Hemsted
ab32f40b2c give access to org page for any user with permission
also, refactor the org tests into a folder to avoid megalith testing
files.

Also hardcode the org id to a variable so it can be referred to from
various places. In conftest there is now ORGANISATION_ID, which
represents an organisation that `active_user_with_permissions` has
access to
2018-03-14 15:39:55 +00:00
Leo Hemsted
4fd0ce338c change org page to have org permissions rather than platform admin permissions 2018-03-14 15:39:55 +00:00
Leo Hemsted
ffd062c415 fix imports 2018-03-14 15:39:55 +00:00
Leo Hemsted
ad6e34eb43 dont use has_permissions to check for platform admins
platform_admin is a separate concept to permissions, so by removing the
checks for it from the current_user.has_permissions function, we can
simplify things greatly. We already record on the user whether they're
a platform admin anyway.
2018-03-14 15:39:55 +00:00
kentsanggds
1a4adfafa0 Merge pull request #1956 from alphagov/ken-update-text-add-provided-as-pdf
Add Provided as PDF in preview page.
2018-03-14 13:35:10 +00:00
Ken Tsang
cc588ca56f Add Provided as PDF in preview page. 2018-03-14 13:16:27 +00:00
Chris Waszczuk
7b6520988c Merge pull request #1940 from alphagov/adjust-email-auth-token-error-message
Add catch for http error on invite token check
2018-03-14 10:43:16 +00:00
Chris Hill-Scott
6462081f71 Retitle request to go live submission page
`<h1>`s should be unique across the site. This page’s `<h1>` matches
that of the previous page (the one with the checklist).

This commit re-titles it to:
- be unique
- more accurately describe the content of the page
2018-03-13 12:02:36 +00:00
Chris Hill-Scott
6fd483e395 Tweak spacing 2018-03-13 11:57:20 +00:00
Chris Hill-Scott
a2544a4d79 Remove the MoU question from request to go live
This question was designed to make people feel like it was OK to submit
their request without getting the MoU signed. We reckoned that this was
the fastest way of getting their service live (because the MoU is the
bit that’s most likely to slow them down).

We now have a better way of telling people:
- if they’ve signed the MoU already
- or to contact us if they haven’t (which is what the majority of teams
  seem to do now)

We were never actually using the answer to this question – we were still
checking for every service whether they had it signed.

So this commit removes this now-redundant question.
2018-03-13 11:55:39 +00:00
Chris Hill-Scott
0fae94edbe Merge pull request #1952 from alphagov/no-no-permissions-banner
Replace ‘no permissions’ banner with a line on the template page
2018-03-13 09:48:54 +00:00
Chris Hill-Scott
c1ddf5de15 Merge pull request #1947 from alphagov/hmpo
Add Her Majesty’s Passport Office to domain list
2018-03-12 16:08:36 +00:00
Chris Hill-Scott
26c91def88 Merge pull request #1950 from alphagov/reword-rtgl
Reword request to go live checklist page
2018-03-12 16:08:30 +00:00
Chris Hill-Scott
9d246699f4 Merge pull request #1951 from alphagov/166-176
166-176 services and 66-68 organisations
2018-03-12 16:08:25 +00:00
Chris Hill-Scott
9435f69a6e Remove warning banner from dashboard (and app)
We have teams who are using the dashboard every day, and being
confronted with this alarming yellow banner. There’s no action they need
to do since they’re only looking at the messages sent.

So this commit removes that banner from the dashboard. It also removes
the CSS and HTML for it from the app entirely because this is the last
remaining place we were using this style of banner.
2018-03-12 16:04:27 +00:00
Chris Hill-Scott
9838c3908b Add line to template page if you can’t do anything
If someone has no permissions but needs permissions the thing they’re
probably going to need is to send a message or edit a template.

The place they will probably come to is the place where the buttons
would be – users with these permissions are finding the thing they need
to do on this page.

So this commit adds a line to this page which (hopefully) makes it clear
they’re in the right place, but need to go and speak to someone.
2018-03-12 16:02:33 +00:00
Pete Herlihy
a97c7e8758 166-176 services and 66-68 organisations
* HM Courts and Tribunals - HM Courts & Tribunals Service
* Leicester City Council - Leicester City Council
* Divorce Service Line - HM Courts & Tribunals Service
* Jury Central Summoning Bureau - Ministry of Justice
* ISU - Pembrokeshire County Council
* ESFA pre-16 funding - Department for Education
* ONS Business Continuity Alert System - Office of National Statistics
* HMPO Business Resilience Team - Home Office
* Rugby Borough Council - Rugby Borough Council
* Common Platform - HM Courts & Tribunals Service
2018-03-12 15:56:02 +00:00
Rebecca Law
3a604ff7d8 Merge pull request #1949 from alphagov/fix-inbound-search
Fix bug with inbound message page
2018-03-12 13:32:41 +00:00
Rebecca Law
26866f441e Add asset in test 2018-03-12 13:28:20 +00:00
Chris Hill-Scott
de7701d407 Reword request to go live checklist page
Implements Thom’s suggestions.
2018-03-12 13:17:55 +00:00
Chris Hill-Scott
a429e799e1 Merge pull request #1948 from alphagov/quis-patch-1
Record Rugby Borough Council signing the agreement
2018-03-12 13:09:09 +00:00
Rebecca Law
58de759ef4 Fix bug with inbound message page
The get notifications endpoint needs the template_type for search. The inbox page for inbound sms messages was not passing that through, which caused a 400 response.
This resolves that by passing the template_type to the api.
2018-03-12 12:44:32 +00:00
kentsanggds
0d4bed1e55 Merge pull request #1946 from alphagov/ken-show-provided-as-pdf-for-precompiled-letters
Set template subject to Provided as PDF for precompiled letters
2018-03-12 10:47:05 +00:00
Chris Waszczuk
4b929aaa6c Merge pull request #1934 from alphagov/update-service-name
Update Organisation Name
2018-03-12 10:13:57 +00:00
Chris Hill-Scott
fcc7927d07 Record Rugby Borough Council signing the agreement 2018-03-09 16:58:14 +00:00
Chris Hill-Scott
501960df57 Add Her Majesty’s Passport Office to domain list
They are covered by the agreement we have with Home Office.

> HM Passport Office is part of the Home Office.
– https://www.gov.uk/government/organisations/hm-passport-office
2018-03-09 16:43:56 +00:00
Chris Hill-Scott
548ece6c22 Merge pull request #1925 from alphagov/refactored-csv-processing
Bring in refactored CSV processing
2018-03-09 15:16:37 +00:00
Chris Hill-Scott
7609ad3f8c Filter empty items out of lists
The email template does this already when formatting the body of the
message. But the spreadsheet preview doesn’t, which means you get lists
like:
- thing
- thing
- None

This commit fixes that.

This was a pre-existing bug, but gonna roll it in with this PR.
2018-03-09 15:13:21 +00:00
Sakis
aae04227a7 Merge pull request #1944 from alphagov/error-handling
Error handling
2018-03-09 14:33:34 +00:00
Richard Chapman
4227d1a094 Merge pull request #1942 from alphagov/update_letter_preview_display_precompiled_pages
Precompiled page count for preview
2018-03-09 13:41:05 +00:00
Richard Chapman
86a474ce8b Moved the call to retrieve the pdf into the is_precompiled_letter block
as it did not need to be called for standard letters.

Changed the tests to use the mock from get_notification_letter_preview
instead of a generic NotificationApiClient.get. This will hopefully
protect any subsequent changes or calls from not being tested in future.
2018-03-09 13:30:16 +00:00
Richard Chapman
e25c6cd3b9 Updated so that a precompiled pdf page count can be passed to the
rendering template. Currently it uses the template from the API to
calculate this which for a precompiled template is always 1.

Gets the PDF and then uses the utils method to get the page count.

* Added logic for precompiled letters
* Added test to test the new path
* Updated existing tests now the path has changed
2018-03-09 13:30:16 +00:00
Ken Tsang
89a04aa6a0 Set template subject to Provided as PDF for precompiled letters
- easier to change the text in Admin rather than do a database update on API and should be easy to change if the text should change in the future
2018-03-09 12:32:36 +00:00
Athanasios Voutsadakis
d49d97745c Don't serve 500s on demand 2018-03-09 12:28:55 +00:00
Leo Hemsted
60a79131e6 Merge pull request #1941 from alphagov/rtgl-org-info
Add what we know of agreements to go live request
2018-03-09 12:20:57 +00:00
Leo Hemsted
34d039d85a Merge pull request #1945 from alphagov/org-invite-api-fix
fix org invite api client
2018-03-09 12:18:25 +00:00
Leo Hemsted
7771410873 Merge pull request #1943 from alphagov/fix-miscounted-users
Fix count of users on request to go live
2018-03-09 12:18:15 +00:00
Athanasios Voutsadakis
7828afe0d7 Sort requirements 2018-03-09 11:56:34 +00:00
Leo Hemsted
09f7de8015 fix org invite api client 2018-03-09 11:45:20 +00:00
Chris Hill-Scott
240f11e715 Fix count of users on request to go live
We were counting users who had the `manage_settings` permission. This
is the old name for it, therefore there would never be any users with
this permission, so the tick would never go green.

The new name for the permission is `manage_service`. This commit fixes
the error, and adds an extra safeguard against something like this
happening again.
2018-03-09 10:52:13 +00:00
Athanasios Voutsadakis
440f1bdc7c assets' 413.html is not used anymore 2018-03-09 10:51:48 +00:00
Athanasios Voutsadakis
1764499a25 Merge branch 'master' into error-handling 2018-03-09 10:17:17 +00:00
Chris Hill-Scott
5d4fc23128 Merge pull request #1931 from alphagov/letter-status-colour
Don’t change colour of sent date for letters
2018-03-09 09:51:40 +00:00
Chris Hill-Scott
ed5f2e5e62 Merge pull request #1936 from alphagov/quis-patch-1
Fix typo
2018-03-09 09:51:33 +00:00
Chris Hill-Scott
6e869bfdef Merge pull request #1909 from alphagov/request-to-go-live-automation
Add a checklist to the request to go live page
2018-03-09 09:51:27 +00:00
Athanasios Voutsadakis
249ae41c24 Add error handling
This adds an /error/XXX endpoint that triggers the corresponding XXX
error code and its handling.

Related: https://github.com/alphagov/notifications-aws/pull/331
2018-03-08 17:49:08 +00:00