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

enhance: Add ListGrants and ListGrant RBAC methods #743

Merged
merged 1 commit into from
May 30, 2024

Conversation

punkerpunker
Copy link
Contributor

@punkerpunker punkerpunker commented May 2, 2024

Resolves #744

Two methods:

// ListGrant lists a grant info for the role and the specific object
ListGrant(ctx context.Context, role string, object string, objectName string, dbName string) ([]entity.RoleGrants, error)
// ListGrants lists all assigned privileges and objects for the role.
ListGrants(ctx context.Context, role string, dbName string) ([]entity.RoleGrants, error)

And a structure:

type RoleGrants struct {
	Object        string
	ObjectName    string
	RoleName      string
	GrantorName   string
	PrivilegeName string
	DbName        string
}

PyMilvus's implementation (and signatures, names) of such methods was taken as an inspiration here.

Thanks!

@sre-ci-robot sre-ci-robot requested review from congqixia and yah01 May 2, 2024 14:36
@sre-ci-robot sre-ci-robot added the size/L Denotes a PR that changes 100-499 lines. label May 2, 2024
@mergify mergify bot added the ci-passed auto merge needed label label May 2, 2024
@punkerpunker
Copy link
Contributor Author

punkerpunker commented May 29, 2024

Hi @congqixia, can we please get this one merged? Thanks! That one follows the #697

Copy link
Contributor

@congqixia congqixia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@sre-ci-robot sre-ci-robot added the lgtm look good to me label May 30, 2024
@sre-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: congqixia, punkerpunker

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sre-ci-robot sre-ci-robot added the approved review approved label May 30, 2024
@sre-ci-robot sre-ci-robot merged commit be3ac4b into milvus-io:master May 30, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved review approved ci-passed auto merge needed label lgtm look good to me size/L Denotes a PR that changes 100-499 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: ListGrant and ListGrants method for the RBAC client
3 participants