From 722d1f0af4879ddb8b14cd240b85d5af60ccb191 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Fri, 7 Jun 2019 09:51:34 +0100 Subject: [PATCH] Hide organisation services MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- app/templates/views/choose-account.html | 9 --------- tests/app/main/views/accounts/test_choose_accounts.py | 6 ++---- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/app/templates/views/choose-account.html b/app/templates/views/choose-account.html index b96856045..a7f6e51e1 100644 --- a/app/templates/views/choose-account.html +++ b/app/templates/views/choose-account.html @@ -20,15 +20,6 @@ {% for org in current_user.organisations %}
  • {{ org.name }} - {% if org.services %} - - {% endif %}
  • {% endfor %} diff --git a/tests/app/main/views/accounts/test_choose_accounts.py b/tests/app/main/views/accounts/test_choose_accounts.py index f7c7f4fc3..3959520ff 100644 --- a/tests/app/main/views/accounts/test_choose_accounts.py +++ b/tests/app/main/views/accounts/test_choose_accounts.py @@ -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'