Skip to content

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

Description

@MohamadTahir

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions