Skip to content

Commit de275e8

Browse files
authored
feat(iam): allow updating a Member's email (scaleway#4277)
1 parent d386384 commit de275e8

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

cmd/scw/testdata/test-all-usage-iam-user-update-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ USAGE:
88
ARGS:
99
user-id ID of the user to update
1010
[tags.{index}] New tags for the user (maximum of 10 tags)
11+
[email] New email for the user (only available on Members)
1112

1213
FLAGS:
1314
-h, --help help for update

docs/commands/iam.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,6 +1146,7 @@ scw iam user update <user-id ...> [arg=value ...]
11461146
|------|---|-------------|
11471147
| user-id | Required | ID of the user to update |
11481148
| tags.{index} | | New tags for the user (maximum of 10 tags) |
1149+
| email | | New email for the user (only available on Members) |
11491150

11501151

11511152

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ require (
2626
github.com/mattn/go-isatty v0.0.20
2727
github.com/moby/buildkit v0.13.2
2828
github.com/opencontainers/go-digest v1.0.0
29-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241113181427-c47c15a89f6f
29+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241118091633-210045c18c91
3030
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
3131
github.com/spf13/cobra v1.8.1
3232
github.com/spf13/pflag v1.0.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
466466
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
467467
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
468468
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
469-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241113181427-c47c15a89f6f h1:FOwfdtT4MrTOhdnHpgkdguVsxN/8VLBi90Cd2qTrVbM=
470-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241113181427-c47c15a89f6f/go.mod h1:kAoejOVBg1E/aVAR6IwKWEmbLCEg2IXklzPAkxzAaXA=
469+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241118091633-210045c18c91 h1:b/m0VHa03JOPC3xbrhUFxvsmB1SDiNa+CJ5y0BUD8SY=
470+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241118091633-210045c18c91/go.mod h1:kAoejOVBg1E/aVAR6IwKWEmbLCEg2IXklzPAkxzAaXA=
471471
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
472472
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
473473
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/iam/v1alpha1/iam_cli.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,13 @@ func iamUserUpdate() *core.Command {
550550
Deprecated: false,
551551
Positional: false,
552552
},
553+
{
554+
Name: "email",
555+
Short: `New email for the user (only available on Members)`,
556+
Required: false,
557+
Deprecated: false,
558+
Positional: false,
559+
},
553560
},
554561
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
555562
request := args.(*iam.UpdateUserRequest)

0 commit comments

Comments
 (0)