MCPcopy Create free account
hub / github.com/auth0/auth0-cli / connectionHasEnabledClients

Function connectionHasEnabledClients

internal/cli/users.go:1027–1034  ·  view source on GitHub ↗

connectionHasEnabledClients checks if a connection has any enabled clients using the dedicated endpoint (replaces deprecated enabled_clients field).

(ctx context.Context, api auth0.ConnectionAPI, connectionID string)

Source from the content-addressed store, hash-verified

1025// connectionHasEnabledClients checks if a connection has any enabled clients
1026// using the dedicated endpoint (replaces deprecated enabled_clients field).
1027func connectionHasEnabledClients(ctx context.Context, api auth0.ConnectionAPI, connectionID string) (bool, error) {
1028 clients, err := api.ReadEnabledClients(ctx, connectionID)
1029 if err != nil {
1030 return false, err
1031 }
1032
1033 return clients.Clients != nil && len(*clients.Clients) > 0, nil
1034}
1035
1036func (c *cli) getUserConnection(users *management.User) []string {
1037 var res []string

Callers 3

createUserCmdFunction · 0.85
importUsersCmdFunction · 0.85

Calls 1

ReadEnabledClientsMethod · 0.65

Tested by

no test coverage detected