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)
| 1025 | // connectionHasEnabledClients checks if a connection has any enabled clients |
| 1026 | // using the dedicated endpoint (replaces deprecated enabled_clients field). |
| 1027 | func 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 | |
| 1036 | func (c *cli) getUserConnection(users *management.User) []string { |
| 1037 | var res []string |
no test coverage detected