mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 13:39:41 -04:00
Only show relevant user permissions for broadcast services
For services with the broadcast permission this hides: - the ‘View dashboard’ permission (and defaults it to _checked_) because all users of broadcast services will need to see the dashboard - the ‘Manage API keys’ permission (and defaults it to _not checked_) because we don’t offer an API integration for broadcast services yet – if we do we won’t want existing users to automatically get the permission It relabels: - the ‘Send’ permission to ‘Prepare and approve’ to match the current, slightly clunky language on the templates page - the ‘Manage settings’ label to not refer to ‘usage’ because broadcast services won’t incur cost
This commit is contained in:
@@ -25,6 +25,12 @@ permissions = (
|
||||
('manage_api_keys', 'Manage API integration'),
|
||||
)
|
||||
|
||||
broadcast_permissions = (
|
||||
('send_messages', 'Prepare and approve broadcasts'),
|
||||
('manage_templates', 'Add and edit templates'),
|
||||
('manage_service', 'Manage settings and team'),
|
||||
)
|
||||
|
||||
|
||||
def translate_permissions_from_db_to_admin_roles(permissions):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user