Add --org flag to login command for organization validation #258
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add --org flag to login command for organization validation
Summary
Added a
--org/-oflag to thebrev logincommand that allows users to specify which organization to use during login. The flag validates that the organization exists (without creating it) and sets it as the default organization after successful authentication.Key Changes:
SetDefaultOrganizationmethod toLoginStoreinterface--org/-oflag to login command with validation logicgetOrCreateOrgto handle organization validation when flag is providedlscommandReview & Testing Checklist for Human
Recommended Test Plan
brev logoutbrev login --org <existing-org-name>brev ls orgs(should show specified org as active)brev login --org nonexistent-org(should fail with clear error)brev login(should work as before)Notes
lscommand's org handlingSetDefaultOrganizationmethod - ensure all LoginStore implementations support thisgetOrgForRunLsLink to Devin run: https://app.devin.ai/sessions/2270f8421e424040b0557b3385c34bb2
Requested by: @theFong