From c5250659ca0ab2199c66352cd7a1f90721b20334 Mon Sep 17 00:00:00 2001 From: Rita Zerrizuela Date: Wed, 14 Jul 2021 19:26:12 -0300 Subject: [PATCH 1/2] Limit user creation to database connections --- internal/cli/users.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/cli/users.go b/internal/cli/users.go index 01a42769a..4585c260e 100644 --- a/internal/cli/users.go +++ b/internal/cli/users.go @@ -17,11 +17,12 @@ var ( Name: "User ID", Help: "Id of the user.", } + userConnection = Flag{ Name: "Connection", LongForm: "connection", ShortForm: "c", - Help: "Name of the connection this user should be created in. Social connections are not supported.", + Help: "Name of the database connection this user should be created in.", IsRequired: true, } userEmail = Flag{ @@ -548,7 +549,9 @@ func (c *cli) connectionPickerOptions() []string { fmt.Println(err) } for _, conn := range list.Connections { - res = append(res, conn.GetName()) + if conn.GetStrategy() == "auth0" { + res = append(res, conn.GetName()) + } } return res From 07af1699e27b044f29f84dbd19d51977a488fe7d Mon Sep 17 00:00:00 2001 From: Rita Zerrizuela Date: Wed, 14 Jul 2021 19:27:17 -0300 Subject: [PATCH 2/2] Update docs --- docs/auth0_users_create.md | 2 +- docs/auth0_users_update.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/auth0_users_create.md b/docs/auth0_users_create.md index a17bf22d2..1b53e6877 100644 --- a/docs/auth0_users_create.md +++ b/docs/auth0_users_create.md @@ -25,7 +25,7 @@ auth0 users create -n "John Doe" --e john@example.com --connection "Username-Pas ### Options ``` - -c, --connection string Name of the connection this user should be created in. Social connections are not supported. + -c, --connection string Name of the database connection this user should be created in. -e, --email string The user's email. -h, --help help for create -n, --name string The user's full name. diff --git a/docs/auth0_users_update.md b/docs/auth0_users_update.md index 5538ec24e..83504fdb1 100644 --- a/docs/auth0_users_update.md +++ b/docs/auth0_users_update.md @@ -25,7 +25,7 @@ auth0 users update -n John Doe --email john.doe@example.com ### Options ``` - -c, --connection string Name of the connection this user should be created in. Social connections are not supported. + -c, --connection string Name of the database connection this user should be created in. -e, --email string The user's email. -h, --help help for update -n, --name string The user's full name.