Skip to content

Commit

Permalink
[Cherry-Pick]: Improve the default db for the rbac (#1752) (#1753)
Browse files Browse the repository at this point in the history
Signed-off-by: SimFG <[email protected]>
  • Loading branch information
SimFG authored Oct 25, 2023
1 parent bfbd2f4 commit 198db18
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pymilvus/orm/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 198db18

Please sign in to comment.