mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Only show relevant permissions on the team members page
Since users of broadcast services will always have the view dashboard permission and never have the API keys permission we can hide these. And we should re-label the permissions to make sense in the context of broadcasting.
This commit is contained in:
@@ -27,7 +27,7 @@ from app.main.forms import (
|
||||
PermissionsForm,
|
||||
SearchUsersForm,
|
||||
)
|
||||
from app.models.roles_and_permissions import permissions
|
||||
from app.models.roles_and_permissions import broadcast_permissions, permissions
|
||||
from app.models.user import InvitedUser, User
|
||||
from app.utils import is_gov_user, redact_mobile_number, user_has_permissions
|
||||
|
||||
@@ -41,7 +41,9 @@ def manage_users(service_id):
|
||||
current_user=current_user,
|
||||
show_search_box=(len(current_service.team_members) > 7),
|
||||
form=SearchUsersForm(),
|
||||
permissions=permissions,
|
||||
permissions=(
|
||||
broadcast_permissions if current_service.has_permission('broadcast') else permissions
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user