mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
Allow users with new broadcast permissions access to routes
Added two new permissions - `create_broadcasts` and `approve_broadcasts`. These new permissions get added to the `has_permissions` decorator of the broadcast routes to allow the routes to be accessed with either the old permissions on the new ones while we switch over. We were using the `send_messages` permission for the broadcast routes. By having two new permissions we can allow a more granular control of these routes.
This commit is contained in:
@@ -6,6 +6,8 @@ roles = {
|
||||
'manage_service': ['manage_users', 'manage_settings'],
|
||||
'manage_api_keys': ['manage_api_keys'],
|
||||
'view_activity': ['view_activity'],
|
||||
'create_broadcasts': ['manage_templates', 'create_broadcasts', 'reject_broadcasts', 'cancel_broadcasts'],
|
||||
'approve_broadcasts': ['approve_broadcasts', 'reject_broadcasts', 'cancel_broadcasts'],
|
||||
}
|
||||
|
||||
# same dict as above, but flipped round
|
||||
|
||||
Reference in New Issue
Block a user