diff --git a/pymilvus/orm/role.py b/pymilvus/orm/role.py index 66c68dd77..989ef8c73 100644 --- a/pymilvus/orm/role.py +++ b/pymilvus/orm/role.py @@ -272,9 +272,9 @@ def create_privilege_group(self, privilege_group: str): >>> from pymilvus.orm.role import Role >>> connections.connect() >>> role = Role(role_name) - >>> role.create_privilege_group(privilege_group) + >>> role.create_privilege_group(privilege_group="privilege_group") """ - return self._get_connection().create_privilege_group(self._name, privilege_group) + return self._get_connection().create_privilege_group(privilege_group) def drop_privilege_group(self, privilege_group: str): """Drop a privilege group for the role @@ -286,9 +286,9 @@ def drop_privilege_group(self, privilege_group: str): >>> from pymilvus.orm.role import Role >>> connections.connect() >>> role = Role(role_name) - >>> role.drop_privilege_group(privilege_group) + >>> role.drop_privilege_group(privilege_group="privilege_group") """ - return self._get_connection().drop_privilege_group(self._name, privilege_group) + return self._get_connection().drop_privilege_group(privilege_group) def list_privilege_groups(self): """List all privilege groups for the role @@ -305,7 +305,7 @@ def list_privilege_groups(self): >>> role = Role(role_name) >>> role.list_privilege_groups() """ - return self._get_connection().list_privilege_groups(self._name) + return self._get_connection().list_privilege_groups() def add_privileges_to_group(self, privilege_group: str, privileges: list): """Add privileges to a privilege group for the role @@ -319,11 +319,10 @@ def add_privileges_to_group(self, privilege_group: str, privileges: list): >>> from pymilvus.orm.role import Role >>> connections.connect() >>> role = Role(role_name) - >>> role.add_privileges_to_group(privilege_group, ["Insert", "Select"]) + >>> role.add_privileges_to_group(privilege_group="privilege_group", + >>> privileges=["Insert","Select"]) """ - return self._get_connection().add_privileges_to_group( - self._name, privilege_group, privileges - ) + return self._get_connection().add_privileges_to_group(privilege_group, privileges) def remove_privileges_from_group(self, privilege_group: str, privileges: list): """Remove privileges from a privilege group for the role @@ -337,8 +336,7 @@ def remove_privileges_from_group(self, privilege_group: str, privileges: list): >>> from pymilvus.orm.role import Role >>> connections.connect() >>> role = Role(role_name) - >>> role.remove_privileges_from_group(privilege_group, ["Insert", "Select"]) + >>> role.remove_privileges_from_group(privilege_group="privilege_group", + >>> privileges=["Insert","Select"]) """ - return self._get_connection().remove_privileges_from_group( - self._name, privilege_group, privileges - ) + return self._get_connection().remove_privileges_from_group(privilege_group, privileges)