Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use domains for tenant name in config.json and for display #241

Merged
merged 3 commits into from
Apr 9, 2021

Conversation

chrisscott
Copy link
Contributor

Also, fix a bug and use first selection for tenant use if no selection is made.

Description

Use the domain name instead of tenant name for display and re-key config.json to use domain instead of name for the tenants object.

References

https://auth0team.atlassian.net/browse/CLI-130

Testing

  • Remove your config file as this contains breaking changes

  • Login

  • tenants list

  • tenants use

  • Login to another tenant and repeat the above commands, using a different tenant

  • Verify the default tenant is set correctly in your config

  • Use other commands that show the tenant header and verify the domain is displayed instead of the tenant name (e.g. apis list

  • Logout

  • Verify logged out tenant is removed from the config and the default is set correctly

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not master

… selection for `tenant use` if no selection is made.
@Widcket
Copy link
Contributor

Widcket commented Apr 9, 2021

@chrisscott res, err := tr.Refresh(ctx, t.Name) is using the tenant name here.

@Widcket
Copy link
Contributor

Widcket commented Apr 9, 2021

Other than that, I've followed the test steps and it works fine 💪🏻

Screen Shot 2021-04-09 at 16 52 03

Screen Shot 2021-04-09 at 16 53 16

Screen Shot 2021-04-09 at 16 51 41

@Widcket Widcket requested a review from a team April 9, 2021 20:07
}

input := prompt.SelectInput("tenant", "Tenant:", "Tenant to activate", tenNames, "", true)
input := prompt.SelectInput("tenant", "Tenant:", "Tenant to activate", tenNames, tenNames[0], true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@Widcket Widcket requested a review from a team April 9, 2021 20:11
Copy link
Contributor

@Widcket Widcket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Widcket
Copy link
Contributor

Widcket commented Apr 9, 2021

Thanks for doing this 💪🏻

@Widcket Widcket merged commit 6c80cc1 into main Apr 9, 2021
@Widcket Widcket deleted the cli-130-domains-for-tenant-name branch April 9, 2021 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants