Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cherry-Pick]: Improve the default db for the rbac (#1752) #1753

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading