(cli *cli)
| 90 | } |
| 91 | |
| 92 | func openTenantCmd(cli *cli) *cobra.Command { |
| 93 | cmd := &cobra.Command{ |
| 94 | Use: "open", |
| 95 | Args: cobra.MaximumNArgs(1), |
| 96 | Short: "Open the settings page of the tenant", |
| 97 | Long: "Open the tenant's settings page in the Auth0 Dashboard.", |
| 98 | Example: ` auth0 tenants open |
| 99 | auth0 tenants open <tenant> |
| 100 | auth0 tenants open "example.us.auth0.com"`, |
| 101 | RunE: func(cmd *cobra.Command, args []string) error { |
| 102 | selectedTenant, err := selectValidTenantFromConfig(cli, cmd, args) |
| 103 | if err != nil { |
| 104 | return err |
| 105 | } |
| 106 | |
| 107 | openManageURL(cli, selectedTenant, "tenant/general") |
| 108 | return nil |
| 109 | }, |
| 110 | } |
| 111 | |
| 112 | return cmd |
| 113 | } |
| 114 | |
| 115 | func selectValidTenantFromConfig(cli *cli, cmd *cobra.Command, args []string) (string, error) { |
| 116 | if len(args) > 0 { |
no test coverage detected