diff --git a/pymilvus/client/grpc_handler.py b/pymilvus/client/grpc_handler.py index 20a1d2ae1..1472c0fe1 100644 --- a/pymilvus/client/grpc_handler.py +++ b/pymilvus/client/grpc_handler.py @@ -1871,7 +1871,7 @@ def revoke_privilege( ) resp = self._stub.OperatePrivilege(req, wait_for_ready=True, timeout=timeout) check_status(resp) - + @retry_on_rpc_failure() def grant_privilege_v2( self, diff --git a/pymilvus/milvus_client/milvus_client.py b/pymilvus/milvus_client/milvus_client.py index ba4611361..b66efd15b 100644 --- a/pymilvus/milvus_client/milvus_client.py +++ b/pymilvus/milvus_client/milvus_client.py @@ -1002,7 +1002,7 @@ def revoke_privilege( conn.revoke_privilege( role_name, object_type, object_name, privilege, db_name, timeout=timeout, **kwargs ) - + def grant_privilege_v2( self, role_name: str, @@ -1014,7 +1014,7 @@ def grant_privilege_v2( ): conn = self._get_connection() conn.grant_privilege_v2( - role_name, privilege, db_name, collection_name,timeout=timeout, **kwargs + role_name, privilege, db_name, collection_name, timeout=timeout, **kwargs ) def revoke_privilege_v2( @@ -1028,7 +1028,7 @@ def revoke_privilege_v2( ): conn = self._get_connection() conn.revoke_privilege( - role_name, privilege, db_name, collection_name,timeout=timeout, **kwargs + role_name, privilege, db_name, collection_name, timeout=timeout, **kwargs ) def create_alias( diff --git a/pymilvus/orm/role.py b/pymilvus/orm/role.py index 9768f689e..66c68dd77 100644 --- a/pymilvus/orm/role.py +++ b/pymilvus/orm/role.py @@ -190,7 +190,7 @@ def grant_v2(self, privilege: str, db_name: str, collection_name: str): >>> from pymilvus.orm.role import Role >>> connections.connect() >>> role = Role(role_name) - >>> role.grant_v2("Insert", db_name, collection_name) + >>> role.grant_v2("Insert", db_name, collection_name) """ return self._get_connection().grant_privilege_v2( self._name, privilege, db_name, collection_name @@ -210,7 +210,7 @@ def revoke_v2(self, privilege: str, db_name: str, collection_name: str): >>> from pymilvus.orm.role import Role >>> connections.connect() >>> role = Role(role_name) - >>> role.revoke_v2("Insert", db_name, collection_name) + >>> role.revoke_v2("Insert", db_name, collection_name) """ return self._get_connection().revoke_privilege_v2( self._name, privilege, db_name, collection_name