From 198db18d74041b1bc10dfbddc04b20e594d59a55 Mon Sep 17 00:00:00 2001 From: SimFG Date: Wed, 25 Oct 2023 11:16:03 +0800 Subject: [PATCH] [Cherry-Pick]: Improve the default db for the rbac (#1752) (#1753) Signed-off-by: SimFG --- pymilvus/orm/role.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pymilvus/orm/role.py b/pymilvus/orm/role.py index eedb733cb..6fe4a93f4 100644 --- a/pymilvus/orm/role.py +++ b/pymilvus/orm/role.py @@ -135,7 +135,7 @@ def is_exist(self): roles = self._get_connection().select_one_role(self._name, NOT_INCLUDE_USER_INFO) return len(roles.groups) != 0 - def grant(self, object: str, object_name: str, privilege: str, db_name: str = "default"): + def grant(self, object: str, object_name: str, privilege: str, db_name: str = ""): """Grant a privilege for the role :param object: object type. :type object: str @@ -157,7 +157,7 @@ def grant(self, object: str, object_name: str, privilege: str, db_name: str = "d self._name, object, object_name, privilege, db_name ) - def revoke(self, object: str, object_name: str, privilege: str, db_name: str = "default"): + def revoke(self, object: str, object_name: str, privilege: str, db_name: str = ""): """Revoke a privilege for the role Args: object(str): object type. @@ -176,7 +176,7 @@ def revoke(self, object: str, object_name: str, privilege: str, db_name: str = " self._name, object, object_name, privilege, db_name ) - def list_grant(self, object: str, object_name: str, db_name: str = "default"): + def list_grant(self, object: str, object_name: str, db_name: str = ""): """List a grant info for the role and the specific object :param object: object type. :type object: str @@ -202,7 +202,7 @@ def list_grant(self, object: str, object_name: str, db_name: str = "default"): self._name, object, object_name, db_name ) - def list_grants(self, db_name: str = "default"): + def list_grants(self, db_name: str = ""): """List a grant info for the role :param db_name: db name. :type db_name: str