mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Start to remove use of the term "roles"
We don't use this term consistently and it's not defined anywhere. Since most of the Admin app deals with user-facing permssions, it's OK to just use the term "permissions". Where both types of permission are present in the same file, we can more clearly distinguish them as "UI permissions" and "DB permissions".
This commit is contained in:
@@ -59,9 +59,9 @@ from app.models.organisation import Organisation
|
||||
from app.utils import merge_jsonlike
|
||||
from app.utils.user import distinct_email_addresses
|
||||
from app.utils.user_permissions import (
|
||||
all_ui_permissions,
|
||||
broadcast_permission_options,
|
||||
permission_options,
|
||||
roles,
|
||||
)
|
||||
|
||||
|
||||
@@ -1006,7 +1006,7 @@ class BasePermissionsForm(StripWhitespaceForm):
|
||||
**kwargs,
|
||||
**{
|
||||
"permissions_field": [
|
||||
role for role in roles.keys() if user.has_permission_for_service(service_id, role)]
|
||||
role for role in all_ui_permissions if user.has_permission_for_service(service_id, role)]
|
||||
},
|
||||
login_authentication=user.auth_type
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user