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

SetUserReq does not set user policy provided in then AddOrUpdateUserReq #216

Open
MohamadTahir opened this issue Aug 12, 2023 · 0 comments

Comments

@MohamadTahir
Copy link

Hello I am trying to set the users policy when creating the user using SetUserReq

here is an example of what I am trying to do

addOrUpdateUserReq := madmin.AddOrUpdateUserReq{
	Policy:    `readwrite`,
	Status:    madmin.AccountEnabled,
	SecretKey: "passowrd123456",
}

if err := service.Client.SetUserReq(context, "exampleName", addOrUpdateUserReq); err != nil {
	logger.Error(err, "failed to create user")
}
```
I've also tried providing it as 

```
addOrUpdateUserReq := madmin.AddOrUpdateUserReq{
	Policy:    `["readwrite"]`,
	Status:    madmin.AccountEnabled,
	SecretKey: "passowrd123456",
}
```
still doesn't work

thank you in advance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant