Make the permission labels shorter

They were feeling a bit heavy on the _Team members_ page. We can remove
some words without losing any meaning.
This commit is contained in:
Chris Hill-Scott
2018-08-08 14:23:24 +01:00
parent 347912876c
commit 61507fda8f
2 changed files with 45 additions and 45 deletions

View File

@@ -21,10 +21,10 @@ roles_by_permission = {
all_permissions = set(roles_by_permission.values()) all_permissions = set(roles_by_permission.values())
permissions = ( permissions = (
('view_activity', 'See dashboard and reports'), ('view_activity', 'See dashboard'),
('send_messages', 'Send messages using templates'), ('send_messages', 'Send messages'),
('manage_templates', 'Add and edit templates'), ('manage_templates', 'Add and edit templates'),
('manage_service', 'Manage settings, team members and usage'), ('manage_service', 'Manage settings, team and usage'),
('manage_api_keys', 'Manage API integration'), ('manage_api_keys', 'Manage API integration'),
) )

View File

@@ -25,18 +25,18 @@ from tests.conftest import service_one as create_sample_service
active_user_with_permissions, active_user_with_permissions,
( (
'Test User (you) ' 'Test User (you) '
'Can See dashboard and reports ' 'Can See dashboard '
'Can Send messages using templates ' 'Can Send messages '
'Can Add and edit templates ' 'Can Add and edit templates '
'Can Manage settings, team members and usage ' 'Can Manage settings, team and usage '
'Can Manage API integration' 'Can Manage API integration'
), ),
( (
'ZZZZZZZZ zzzzzzz@example.gov.uk ' 'ZZZZZZZZ zzzzzzz@example.gov.uk '
'Can See dashboard and reports ' 'Can See dashboard '
'Cant Send messages using templates ' 'Cant Send messages '
'Cant Add and edit templates ' 'Cant Add and edit templates '
'Cant Manage settings, team members and usage ' 'Cant Manage settings, team and usage '
'Cant Manage API integration ' 'Cant Manage API integration '
'Edit permissions' 'Edit permissions'
) )
@@ -45,18 +45,18 @@ from tests.conftest import service_one as create_sample_service
active_user_empty_permissions, active_user_empty_permissions,
( (
'Test User With Empty Permissions (you) ' 'Test User With Empty Permissions (you) '
'Cant See dashboard and reports ' 'Cant See dashboard '
'Cant Send messages using templates ' 'Cant Send messages '
'Cant Add and edit templates ' 'Cant Add and edit templates '
'Cant Manage settings, team members and usage ' 'Cant Manage settings, team and usage '
'Cant Manage API integration' 'Cant Manage API integration'
), ),
( (
'ZZZZZZZZ zzzzzzz@example.gov.uk ' 'ZZZZZZZZ zzzzzzz@example.gov.uk '
'Can See dashboard and reports ' 'Can See dashboard '
'Cant Send messages using templates ' 'Cant Send messages '
'Cant Add and edit templates ' 'Cant Add and edit templates '
'Cant Manage settings, team members and usage ' 'Cant Manage settings, team and usage '
'Cant Manage API integration' 'Cant Manage API integration'
), ),
), ),
@@ -64,18 +64,18 @@ from tests.conftest import service_one as create_sample_service
active_user_view_permissions, active_user_view_permissions,
( (
'Test User With Permissions (you) ' 'Test User With Permissions (you) '
'Can See dashboard and reports ' 'Can See dashboard '
'Cant Send messages using templates ' 'Cant Send messages '
'Cant Add and edit templates ' 'Cant Add and edit templates '
'Cant Manage settings, team members and usage ' 'Cant Manage settings, team and usage '
'Cant Manage API integration' 'Cant Manage API integration'
), ),
( (
'ZZZZZZZZ zzzzzzz@example.gov.uk ' 'ZZZZZZZZ zzzzzzz@example.gov.uk '
'Can See dashboard and reports ' 'Can See dashboard '
'Cant Send messages using templates ' 'Cant Send messages '
'Cant Add and edit templates ' 'Cant Add and edit templates '
'Cant Manage settings, team members and usage ' 'Cant Manage settings, team and usage '
'Cant Manage API integration' 'Cant Manage API integration'
) )
), ),
@@ -83,18 +83,18 @@ from tests.conftest import service_one as create_sample_service
active_user_manage_template_permission, active_user_manage_template_permission,
( (
'Test User With Permissions (you) ' 'Test User With Permissions (you) '
'Can See dashboard and reports ' 'Can See dashboard '
'Cant Send messages using templates ' 'Cant Send messages '
'Can Add and edit templates ' 'Can Add and edit templates '
'Cant Manage settings, team members and usage ' 'Cant Manage settings, team and usage '
'Cant Manage API integration' 'Cant Manage API integration'
), ),
( (
'ZZZZZZZZ zzzzzzz@example.gov.uk ' 'ZZZZZZZZ zzzzzzz@example.gov.uk '
'Can See dashboard and reports ' 'Can See dashboard '
'Cant Send messages using templates ' 'Cant Send messages '
'Cant Add and edit templates ' 'Cant Add and edit templates '
'Cant Manage settings, team members and usage ' 'Cant Manage settings, team and usage '
'Cant Manage API integration' 'Cant Manage API integration'
) )
), ),
@@ -102,18 +102,18 @@ from tests.conftest import service_one as create_sample_service
active_user_manage_template_permission, active_user_manage_template_permission,
( (
'Test User With Permissions (you) ' 'Test User With Permissions (you) '
'Can See dashboard and reports ' 'Can See dashboard '
'Cant Send messages using templates ' 'Cant Send messages '
'Can Add and edit templates ' 'Can Add and edit templates '
'Cant Manage settings, team members and usage ' 'Cant Manage settings, team and usage '
'Cant Manage API integration' 'Cant Manage API integration'
), ),
( (
'ZZZZZZZZ zzzzzzz@example.gov.uk ' 'ZZZZZZZZ zzzzzzz@example.gov.uk '
'Can See dashboard and reports ' 'Can See dashboard '
'Cant Send messages using templates ' 'Cant Send messages '
'Cant Add and edit templates ' 'Cant Add and edit templates '
'Cant Manage settings, team members and usage ' 'Cant Manage settings, team and usage '
'Cant Manage API integration' 'Cant Manage API integration'
) )
), ),
@@ -174,19 +174,19 @@ def test_should_show_caseworker_on_overview_page(
assert normalize_spaces(page.select_one('h1').text) == 'Team members' assert normalize_spaces(page.select_one('h1').text) == 'Team members'
assert normalize_spaces(page.select('.user-list-item')[0].text) == ( assert normalize_spaces(page.select('.user-list-item')[0].text) == (
'Test User With Permissions (you) ' 'Test User With Permissions (you) '
'Can See dashboard and reports ' 'Can See dashboard '
'Cant Send messages using templates ' 'Cant Send messages '
'Cant Add and edit templates ' 'Cant Add and edit templates '
'Cant Manage settings, team members and usage ' 'Cant Manage settings, team and usage '
'Cant Manage API integration' 'Cant Manage API integration'
) )
# [1:5] are invited users # [1:5] are invited users
assert normalize_spaces(page.select('.user-list-item')[6].text) == ( assert normalize_spaces(page.select('.user-list-item')[6].text) == (
'Test User zzzzzzz@example.gov.uk ' 'Test User zzzzzzz@example.gov.uk '
'Cant See dashboard and reports ' 'Cant See dashboard '
'Can Send messages using templates ' 'Can Send messages '
'Cant Add and edit templates ' 'Cant Add and edit templates '
'Cant Manage settings, team members and usage ' 'Cant Manage settings, team and usage '
'Cant Manage API integration' 'Cant Manage API integration'
) )
@@ -605,20 +605,20 @@ def test_cancel_invited_user_cancels_user_invitations(
@pytest.mark.parametrize('invite_status, expected_text', [ @pytest.mark.parametrize('invite_status, expected_text', [
('pending', ( ('pending', (
'invited_user@test.gov.uk (invited) ' 'invited_user@test.gov.uk (invited) '
'Can See dashboard and reports ' 'Can See dashboard '
'Can Send messages using templates ' 'Can Send messages '
'Cant Add and edit templates ' 'Cant Add and edit templates '
'Can Manage settings, team members and usage ' 'Can Manage settings, team and usage '
'Can Manage API integration ' 'Can Manage API integration '
'Cancel invitation' 'Cancel invitation'
)), )),
('cancelled', ( ('cancelled', (
'invited_user@test.gov.uk (cancelled invite) ' 'invited_user@test.gov.uk (cancelled invite) '
# all permissions are greyed out # all permissions are greyed out
'Cant See dashboard and reports ' 'Cant See dashboard '
'Cant Send messages using templates ' 'Cant Send messages '
'Cant Add and edit templates ' 'Cant Add and edit templates '
'Cant Manage settings, team members and usage ' 'Cant Manage settings, team and usage '
'Cant Manage API integration' 'Cant Manage API integration'
)), )),
]) ])