Replace remaining uses of the term "role"

In one case I did this by refactoring the code to avoid the need
for the "role" variable in the first place.
This commit is contained in:
Ben Thorner
2021-07-22 14:51:52 +01:00
parent dcfff87cc0
commit 354cd8bb16
2 changed files with 10 additions and 8 deletions

View File

@@ -147,7 +147,7 @@ class UserApiClient(NotifyAdminAPIClient):
@cache.delete('service-{service_id}-template-folders')
@cache.delete('user-{user_id}')
def add_user_to_service(self, service_id, user_id, permissions, folder_permissions):
# permissions passed in are the combined admin roles, not db permissions
# permissions passed in are the combined UI permissions, not DB permissions
endpoint = '/service/{}/users/{}'.format(service_id, user_id)
data = {
'permissions': [{'permission': x} for x in translate_permissions_from_ui_to_db(permissions)],
@@ -164,7 +164,7 @@ class UserApiClient(NotifyAdminAPIClient):
@cache.delete('service-{service_id}-template-folders')
@cache.delete('user-{user_id}')
def set_user_permissions(self, user_id, service_id, permissions, folder_permissions=None):
# permissions passed in are the combined admin roles, not db permissions
# permissions passed in are the combined UI permissions, not DB permissions
data = {
'permissions': [{'permission': x} for x in translate_permissions_from_ui_to_db(permissions)],
}