Hide organisation services

We think users fall into three buckets:

Has access to a few live services, no organisations
--
In this case they user will just see the list of live services they have
access to – pretty straightforward.

Has access to all live services, plus the organisation
--
Conceptually the live services are part of the organisation, whereas the
trial mode ones aren’t. So it makes sense to go through the organisation
to see the live services. If we listed the live services on the choose
service page then we’d be confusingly duplicating them on the
organisation page.

Has access to the organisation, but no services
--
The user doesn’t have direct access to their organisation’s services, so
they need to go to via the organisation page to change service.

For both of the latter we’ll be providing a quick breadcrumb route back
into the organisation, so most of the time they won’t need to use the
choose service page at all.
This commit is contained in:
Chris Hill-Scott
2019-06-07 09:51:34 +01:00
parent 63ba3a6f30
commit 722d1f0af4
2 changed files with 2 additions and 13 deletions

View File

@@ -20,15 +20,6 @@
{% for org in current_user.organisations %}
<li class="browse-list-item">
<a href="{{ url_for('.organisation_dashboard', org_id=org.id) }}" class="browse-list-link">{{ org.name }}</a>
{% if org.services %}
<ul class="browse-sub-list">
{% for item in org.services %}
<li class="browse-list-sub-item">
<a href="{{ url_for('.service_dashboard', service_id=item.id) }}" class="browse-list-link">{{ item.name }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
<div class="keyline-block"></div>
{% endfor %}

View File

@@ -64,14 +64,12 @@ def test_choose_account_should_show_choose_accounts_page(
# first org
assert outer_list_items[0].a.text == 'org_1'
assert outer_list_items[0].a['href'] == url_for('.organisation_dashboard', org_id='o1')
outer_list_orgs = outer_list_items[0].ul
assert ' '.join(outer_list_orgs.stripped_strings) == 'org_service_1 org_service_2 org_service_3'
assert not outer_list_items[0].ul
# second org
assert outer_list_items[1].a.text == 'org_2'
assert outer_list_items[1].a['href'] == url_for('.organisation_dashboard', org_id='o2')
outer_list_orgs = outer_list_items[1].ul
assert ' '.join(outer_list_orgs.stripped_strings) == 'org_service_4'
assert not outer_list_items[2].ul
# third org
assert outer_list_items[2].a.text == 'org_3'