Skip to content

CLI Org support #11927

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

Closed
Emyrk opened this issue Jan 30, 2024 · 2 comments · Fixed by #12265
Closed

CLI Org support #11927

Emyrk opened this issue Jan 30, 2024 · 2 comments · Fixed by #12265
Assignees
Labels
design needed Request for more beauty needs decision Needs a higher-level decision to be unblocked.

Comments

@Emyrk
Copy link
Member

Emyrk commented Jan 30, 2024

coder/cli/root.go

Lines 664 to 673 in 993c1a6

// CurrentOrganization returns the currently active organization for the authenticated user.
func CurrentOrganization(inv *clibase.Invocation, client *codersdk.Client) (codersdk.Organization, error) {
orgs, err := client.OrganizationsByUser(inv.Context(), codersdk.Me)
if err != nil {
return codersdk.Organization{}, nil
}
// For now, we won't use the config to set this.
// Eventually, we will support changing using "coder switch <org>"
return orgs[0], nil
}

The current cli only supports 1 org. The comment suggests scoping all cli calls to 1 org. Meaning coder ls will only show the workspaces in the current org.

@Emyrk Emyrk added needs decision Needs a higher-level decision to be unblocked. design needed Request for more beauty labels Jan 30, 2024
@Emyrk Emyrk added this to the Multiple Organizations milestone Jan 30, 2024
@cdr-bot cdr-bot bot added the feature label Jan 30, 2024
@Emyrk
Copy link
Member Author

Emyrk commented Jan 30, 2024

@bpmct @sreya might be worth designing this early. I can currently implement how the comment suggests, and maybe that is the way we want it.

This suggests orgs are pretty hard boundaries, and most users would not be switching between them often.

@Emyrk
Copy link
Member Author

Emyrk commented Feb 23, 2024

Done in these.
#12276
#12265
#12259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design needed Request for more beauty needs decision Needs a higher-level decision to be unblocked.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant