Commit Graph

5253 Commits

Author SHA1 Message Date
Leo Hemsted
a6eeb3cd73 Merge pull request #1967 from alphagov/login-redirect
redirect to show_accounts_or_dashboard on login
2018-03-19 16:57:55 +00:00
Leo Hemsted
e000552e56 redirect to show_accounts_or_dashboard on login
show_accounts_or_dashboard has logic about where you should redirect
to. If we let it do this, then that's nicer than duplicating its
logic. We found that it wasn't accounting for orgs in redirects
properly.
2018-03-19 16:41:16 +00:00
Chris Hill-Scott
19817b03ee Merge pull request #1966 from alphagov/cst-not-c
Remove Council for Science & Technology
2018-03-19 16:26:18 +00:00
Leo Hemsted
90c40075c8 Merge pull request #1954 from alphagov/choose-accounts
Choose accounts
2018-03-19 15:26:06 +00:00
Chris Hill-Scott
2979fbc5b4 Merge pull request #1965 from alphagov/checkered-logos
Put checkered background behind email branding
2018-03-19 14:11:36 +00:00
Chris Hill-Scott
62abae80fe Remove Council for Science & Technology
They’re not a council in the sense of a local council.
2018-03-19 14:05:33 +00:00
Chris Hill-Scott
290424c4eb Put checkered background behind email branding
This will stop images which are white with a transparent background
being invisible in the admin app (and accidentally getting overwritten).
2018-03-19 13:11:32 +00:00
Chris Hill-Scott
cd3910556c Merge pull request #1960 from alphagov/dont-validate-across-channels
Don’t validate phone numbers when sending emails
2018-03-16 14:59:42 +00:00
Chris Hill-Scott
ee3ef18ebf Merge pull request #1959 from alphagov/pricing-mou-consistency
Make pricing page consistent in talking about MoU
2018-03-16 14:59:35 +00:00
Chris Hill-Scott
5a2fafb66b Don’t validate phone numbers when sending emails
If you have a placeholder called `((phone number))` in your email
template, and you try to send a one-off message then the form input will
attempt to validate your ‘phone number’.

This is not helpful if you’re trying to put a landline number in your
email, for example.

This only affects messages being sent through the one-off interface.

This commit makes the form be aware of template type, which fixes the
problem.
2018-03-16 14:17:43 +00:00
Chris Hill-Scott
c2bc7eca2c Make pricing page consistent in talking about MoU
We shouldn’t tell people on one page (the terms page) that we know about
their organisations agreement and then on the pricing page tell them to
contact us to find out what we know about the agreement.

So this commit adds the same logic from the terms page to the pricing
page, with wording that makes sense in the pricing context.
2018-03-16 13:10:40 +00:00
Chris Hill-Scott
b2c199e609 Merge pull request #1957 from alphagov/rename-gov-domain
Rename GovernmentDomain to AgreementInfo
2018-03-16 13:06:47 +00:00
Leo Hemsted
666e77e699 redirect (301 MOVED PERMANENTLY) from old choose endpoints 2018-03-16 11:51:19 +00:00
Chris Hill-Scott
056c4ebb88 Rename GovernmentDomain to AgreementInfo
This better describes the data encapsulated by this class, and how we
are now using it.
2018-03-15 10:45:34 +00:00
Chris Hill-Scott
dd7fb71706 Merge pull request #1955 from alphagov/remove-mou-question
Clean up request to go live page
2018-03-15 10:25:24 +00:00
Chris Hill-Scott
2006e092f5 Merge pull request #1937 from alphagov/automate-terms
Make terms page smarter about the agreement
2018-03-15 10:14:14 +00:00
Chris Hill-Scott
59f9fe7df1 Finalise wording
Main changes are to better differentiate between the data sharing and
financial agreement and the terms of use.
2018-03-14 16:04:15 +00:00
Chris Hill-Scott
1ce4c874ad Allow message to be prefilled on feedback page
So that people don’t have to remember what they are supposed to be
asking for and go to the effort of typing out the message.
2018-03-14 16:02:09 +00:00
Chris Hill-Scott
6c47375d9f Make terms page smarter about the agreement
People are emailing us asking if their organisation has signed the
agreement. In some cases they have, so this is a waste of their and
our time.

This commit adds a bit of logic to the terms of use page to tell users
when their organisation has already signed the agreement.
2018-03-14 16:00:59 +00:00
Leo Hemsted
5f2e0d4e49 organisations can be edited by anyone who belongs to that org 2018-03-14 15:39:55 +00:00
Leo Hemsted
d5108d0418 fix my awful rebasing skills 2018-03-14 15:39:55 +00:00
Leo Hemsted
a82ac13d4e split tests out into two separate files 2018-03-14 15:39:55 +00:00
Leo Hemsted
a94fa5472d platform admins can go back to any service 2018-03-14 15:39:55 +00:00
Leo Hemsted
8ef36f13f2 finish tests for choose account page 2018-03-14 15:39:55 +00:00
Leo Hemsted
b7b9b8dd90 make sure mock login sets up session correctly 2018-03-14 15:39:55 +00:00
Leo Hemsted
50f75f9b8d add tests for choose_accounts 2018-03-14 15:39:55 +00:00
chrisw
7e4c5c97b0 adjusted lists for choose accounts page 2018-03-14 15:39:55 +00:00
Leo Hemsted
2f37e37278 rename choose_service to choose_account 2018-03-14 15:39:55 +00:00
Leo Hemsted
8ecbb37f71 raise 503 if you dont mock api properly in your tests
otherwise they'll return unexpected things (eg 404) if you have api
running locally (as you often do in dev)
2018-03-14 15:39:55 +00:00
Leo Hemsted
29ae0118f3 log as exception if the api returns 5xx
if it returns 400 only log warning, as they're much less urgent. it's
probably someone clicking an old invite or something.
2018-03-14 15:39:55 +00:00
Leo Hemsted
1cd8000236 remove browsableitem
it was only used by the choose service page, and then only in kludgy
ways (eg: creating a list containing one item called "add service"),
so lets rip it out and make this page bespoke. Especially now that it's
changed so much.
2018-03-14 15:39:55 +00:00
Leo Hemsted
c651ca3f36 remove unused file 2018-03-14 15:39:55 +00:00
Leo Hemsted
04bfc362a2 save the organisation to the session after the user visits an org page
also remove the service/org from the session if the user is on a diff
type page, to make sure the redirects from /services-or-dashboard plays
nicely
2018-03-14 15:39:55 +00:00
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