mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 10:28:41 -04:00
Add edit_folder_permissions permission
Admin part of alphagov/notifications-api#2356 Adds Folder permissions switch to the platform admin part of service settings page.
This commit is contained in:
@@ -61,12 +61,12 @@ from app.utils import (
|
|||||||
user_is_platform_admin,
|
user_is_platform_admin,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
PLATFORM_ADMIN_SERVICE_PERMISSIONS = OrderedDict([
|
PLATFORM_ADMIN_SERVICE_PERMISSIONS = OrderedDict([
|
||||||
('inbound_sms', {'title': 'Receive inbound SMS', 'requires': 'sms', 'endpoint': '.service_set_inbound_number'}),
|
('inbound_sms', {'title': 'Receive inbound SMS', 'requires': 'sms', 'endpoint': '.service_set_inbound_number'}),
|
||||||
('precompiled_letter', {'title': 'Send precompiled letters', 'requires': 'letter'}),
|
('precompiled_letter', {'title': 'Send precompiled letters', 'requires': 'letter'}),
|
||||||
('email_auth', {'title': 'User auth type editing'}),
|
('email_auth', {'title': 'User auth type editing'}),
|
||||||
('upload_document', {'title': 'Uploading documents', 'endpoint': '.service_switch_can_upload_document'}),
|
('upload_document', {'title': 'Uploading documents', 'endpoint': '.service_switch_can_upload_document'}),
|
||||||
|
('edit_folder_permissions', {'title': 'Folder permissions'}),
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ def test_service_set_permission_requires_platform_admin(
|
|||||||
('inbound_sms', 'False', False),
|
('inbound_sms', 'False', False),
|
||||||
('email_auth', 'True', True),
|
('email_auth', 'True', True),
|
||||||
('email_auth', 'False', False),
|
('email_auth', 'False', False),
|
||||||
|
('edit_folder_permissions', 'True', True),
|
||||||
|
('edit_folder_permissions', 'False', False),
|
||||||
])
|
])
|
||||||
def test_service_set_permission(
|
def test_service_set_permission(
|
||||||
mocker,
|
mocker,
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ def mock_get_service_settings_page_common(
|
|||||||
'Receive inbound SMS Off Change',
|
'Receive inbound SMS Off Change',
|
||||||
'User auth type editing Off Change',
|
'User auth type editing Off Change',
|
||||||
'Uploading documents Off Change',
|
'Uploading documents Off Change',
|
||||||
|
'Folder permissions Off Change',
|
||||||
|
|
||||||
]),
|
]),
|
||||||
])
|
])
|
||||||
|
|||||||
Reference in New Issue
Block a user