Skip to content

Commit

Permalink
Add deprecated check / skip
Browse files Browse the repository at this point in the history
  • Loading branch information
cyx committed Jan 21, 2021
1 parent 4df315f commit 352dc6f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion internal/display/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,19 @@ func (r *Renderer) ClientList(clients []*management.Client) {
r.Heading(ansi.Bold(r.Tenant), "clients")

for _, c := range clients {
if auth0.StringValue(c.Name) == deprecatedAppName {
continue
}

fmt.Fprintf(r.Writer, "- %s (%s)\n", auth0.StringValue(c.Name), appTypeFor(c.AppType))
fmt.Fprintf(r.Writer, " %s: %s\n", ansi.Italic("ClientID"), ansi.Faint(auth0.StringValue(c.ClientID)))
fmt.Fprintf(r.Writer, " client id: %s\n", ansi.Faint(auth0.StringValue(c.ClientID)))
fmt.Fprintln(r.Writer)
}
}

// TODO(cyx): determine if there's a better way to filter this out.
const deprecatedAppName = "All Applications"

func appTypeFor(v *string) string {
switch {
case v == nil:
Expand Down

0 comments on commit 352dc6f

Please sign in to comment.