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

feat(config): improve configuration validation on invalid org id #128

Merged
merged 7 commits into from
Apr 6, 2021

Conversation

olamothe
Copy link
Member

Started as a story to add UT for config:set command.

Ended up doing a bit more work internally:

  • Bumped platform-client to latest version, to get fixes related to types on organization.list()
  • Reworked AuthenticatedClient to add two methods:
    • getAllOrgsUserHasAccessTo(): Promise<OrganizationModels[]>
    • getUserHasAccessToOrg(org): Promise<boolean>
  • Added new UT for config:set
  • Added a check on config:set -o invalid_org_id to block writing an invalid org to config.
  • Some internal rework on login command to leverage the changes to AuthenticatedClient
  • Fix UT for login command

https://coveord.atlassian.net/browse/CDX-208

@github-actions
Copy link
Contributor

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Copy link
Collaborator

@louis-bompart louis-bompart left a comment

Choose a reason for hiding this comment

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

LGTM, some changes to be more semantically correct in the getUserHasAccessToOrg func.

@olamothe olamothe merged commit 676b7f3 into master Apr 6, 2021
@olamothe olamothe deleted the CDX-208 branch April 6, 2021 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants