From 52276e11cb714b25553280499c5938f15cc6fb31 Mon Sep 17 00:00:00 2001 From: Luciano Balmaceda Date: Tue, 2 Jul 2019 11:12:19 -0300 Subject: [PATCH] chore review comments --- auth0/v3/management/roles.py | 12 ++++++------ auth0/v3/management/users.py | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/auth0/v3/management/roles.py b/auth0/v3/management/roles.py index 3c936788..0503d8ed 100644 --- a/auth0/v3/management/roles.py +++ b/auth0/v3/management/roles.py @@ -88,7 +88,7 @@ def update(self, id, body): return self.client.patch(self._url(id), data=body) def list_users(self, id, page=0, per_page=25, include_totals=True): - """Lists the users that have been associated with a given role. + """List the users that have been associated with a given role. Args: id (str): The role's id. @@ -126,7 +126,7 @@ def add_users(self, id, users): return self.client.post(url, data=body) def list_permissions(self, id, page=0, per_page=25, include_totals=True): - """Gets the permissions for a role. + """List the permissions associated to a role. Args: id (str): The role's id. @@ -149,12 +149,12 @@ def list_permissions(self, id, page=0, per_page=25, include_totals=True): return self.client.get(url, params=params) def remove_permissions(self, id, permissions): - """Removes permissions from a role. + """Unassociates permissions from a role. Args: id (str): The role's id. - permissions (list of str): A list of permissions ids to unassociate from the role. + permissions (list of str): A list of permission ids to unassociate from the role. See https://auth0.com/docs/api/management/v2#!/Roles/delete_role_permission_assignment """ @@ -164,12 +164,12 @@ def remove_permissions(self, id, permissions): def add_permissions(self, id, permissions): - """Adds permissions from a role. + """Associates permissions with a role. Args: id (str): The role's id. - permissions (list of str): A list of permissions ids to associate to the role. + permissions (list of str): A list of permission ids to associate to the role. See https://auth0.com/docs/api/management/v2#!/Roles/post_role_permission_assignment """ diff --git a/auth0/v3/management/users.py b/auth0/v3/management/users.py index 9be4854b..79514e09 100644 --- a/auth0/v3/management/users.py +++ b/auth0/v3/management/users.py @@ -130,7 +130,7 @@ def update(self, id, body): return self.client.patch(self._url(id), data=body) def list_roles(self, id, page=0, per_page=25, include_totals=True): - """Get a user's roles. + """List the roles associated with a user. Args: id (str): The user's id. @@ -154,7 +154,7 @@ def list_roles(self, id, page=0, per_page=25, include_totals=True): return self.client.get(url, params=params) def remove_roles(self, id, roles): - """Removes roles from a user. + """Removes an array of roles from a user. Args: id (str): The user's id. @@ -168,7 +168,7 @@ def remove_roles(self, id, roles): return self.client.delete(url, data=body) def add_roles(self, id, roles): - """Assign roles to a user + """Associate an array of roles with a user. Args: id (str): The user's id. @@ -182,7 +182,7 @@ def add_roles(self, id, roles): return self.client.post(url, data=body) def list_permissions(self, id, page=0, per_page=25, include_totals=True): - """Get a user's permissions. + """List the permissions associated to the user. Args: id (str): The user's id. @@ -211,7 +211,7 @@ def remove_permissions(self, id, permissions): Args: id (str): The user's id. - permissions (list of str): A list of permissions ids to unassociate from the user. + permissions (list of str): A list of permission ids to unassociate from the user. See https://auth0.com/docs/api/management/v2#!/Users/delete_permissions """ @@ -220,12 +220,12 @@ def remove_permissions(self, id, permissions): return self.client.delete(url, data=body) def add_permissions(self, id, permissions): - """Assign permissions to a user + """Assign permissions to a user. Args: id (str): The user's id. - permissions (list of str): A list of permissions ids to associated with the user. + permissions (list of str): A list of permission ids to associated with the user. See https://auth0.com/docs/api/management/v2#!/Users/post_permissions """