Debugging the DVLA markup stuff is quite slow, because it’s split
between the API and utils, and things that work in tests don’t always
work with real template content.
This commit adds us a private endpoint that will let us see what DVLA
markup will be generated for any template, enabling a quicker feedback
loop.
We’ve moved from three to four permissions. Four permissions don’t fit
in the exiting horizontal layout.
This commit makes the permissions stack vertically instead.
This approach has some downsides:
- makes the permissions less easy to scan vertically
- makes them take up a lot more space (and at lives services, most of
them have somewhere around 15 team members)
But I think for now it’s better than any horizontal alternative that I
tried.
We’ve seen from research (a long time ago) that the ‘manage service’
permission is too broad, and gives too much control to someone who only
needs the ability to edit templates. In other words, editing content
should be its own, separate permission, rather than being rolled up
into manage service.
Since this is already disaggregated on the API side, making this change
just means changing the mapping on the admin side and adding an extra
checkbox on the invite/edit page. Which is what this commit does.
So for now, an existing user who has the manage service permission gets
both manage service and manage templates (ie no change to what they can
do). Newly invited users will get to choose if they have both, either,
or neither.
This commit makes sure that the right permission choices are shown in
these pages:
- manage team page
- invite a user page
- edit permissions page
This is in order to make changing these pages easier (see subsequent
commits).
This commit makes the existing tests around user permissions less
verbose by using the new `client_request` fixture.
This fixture takes care of:
- setting up a service
- asserting that the response is `200`
It also tests that the page titles, some of which didn’t match with the
`<h1>`s, so this commit also fixes that mismatch.
This functionality was implemented twice, in two different ways. This
commit factors it out into a helper method that can be reused in the
two places. We chose to go with the more explicit implementation because
it’s easier to understand.