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

[Enhancement]: Add DescribeUser methods to map Users with Roles #698

Closed
1 task done
punkerpunker opened this issue Apr 5, 2024 · 0 comments · Fixed by #697
Closed
1 task done

[Enhancement]: Add DescribeUser methods to map Users with Roles #698

punkerpunker opened this issue Apr 5, 2024 · 0 comments · Fixed by #697
Labels
kind/enhancement New feature or request

Comments

@punkerpunker
Copy link
Contributor

punkerpunker commented Apr 5, 2024

Is there an existing issue for this?

  • I have searched the existing issues

What would you like to be added?

I would like to suggest a method to fetch Users with their Roles

Why is this needed?

I am currently writing the RBAC terraform provider for Milvus, and these entries are missing

Anything else?

No response

@punkerpunker punkerpunker added the kind/enhancement New feature or request label Apr 5, 2024
sre-ci-robot pushed a commit that referenced this issue Apr 26, 2024
resolves: #698

I've added an entity:

```
type UserDescription struct {
	Name  string
	Roles []string
}
```

And two methods and tests for them:

- `DescribeUser(ctx context.Context, username string)
(entity.UserDescription, error)` - which returns UserDescription for a
specific user.
- `DescribeUsers(ctx context.Context) ([]entity.UserDescription, error)`
- which returns UserDescription for all users presented.

The thing that I want to raise is that I am not sure if it is feasible
to return empty `UserDescription` entity in case the user from
`DescribeUser` method doesn't exist, I would highly appreciate
suggestions here.

Also, I am not much familiar with the `milvus-sdk-go` codebase and this
is my first PR here, so any comments/feedback/suggestions would be
highly appreciated, thanks!

---------

Signed-off-by: punkerpunker <gleb.vazhenin@team.bumble.dev>
Co-authored-by: punkerpunker <gleb.vazhenin@team.bumble.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant