mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-26 17:24:23 -04:00
Replace "admin roles" with "ui permissions"
In response to: [1].
While this does introduce a new term ("admin roles" is still used
elsewhere in the code), I plan to fix this in a follow-up PR (it
turned out to be quite a big change to do on this branch).
[1]: https://github.com/alphagov/notifications-admin/pull/3970#discussion_r673292339
This commit is contained in:
@@ -135,8 +135,8 @@ class User(JSONModel, UserMixin):
|
||||
create_set_user_permissions_event(
|
||||
user_id=self.id,
|
||||
service_id=service_id,
|
||||
original_admin_roles=self.permissions_for_service(service_id),
|
||||
new_admin_roles=permissions,
|
||||
original_ui_permissions=self.permissions_for_service(service_id),
|
||||
new_ui_permissions=permissions,
|
||||
set_by_id=set_by_id,
|
||||
)
|
||||
|
||||
@@ -425,7 +425,7 @@ class User(JSONModel, UserMixin):
|
||||
user_id=self.id,
|
||||
invited_by_id=invited_by_id,
|
||||
service_id=service_id,
|
||||
admin_roles=permissions,
|
||||
ui_permissions=permissions,
|
||||
)
|
||||
except HTTPError as exception:
|
||||
if exception.status_code == 400 and 'already part of service' in exception.message:
|
||||
|
||||
Reference in New Issue
Block a user