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

CLOUDP-70018: mongocli iam team(s) create #396

Merged
merged 10 commits into from
Sep 2, 2020
Merged

Conversation

andreaangiolillo
Copy link
Collaborator

@andreaangiolillo andreaangiolillo commented Sep 2, 2020

Proposed changes

Jira ticket: CLOUDP-70018

Checklist

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code

Further comments

Got this error when running the command without username.

./bin/mongocli iam teams create test-Team
Error: POST https://cloud-dev.mongodb.com/api/atlas/v1.0/orgs/5e429e7706822c6eac4d5970/teams: 400 (request "Bad Request") A team must contain at least one user. Add a user to your team to continue.

atlas

./bin/mongocli iam teams create test-Team --username charts+5e4e593f70dfbf1010295836@mongodb.com

Team 'test-Team' created.

om

./bin/mongocli iam teams create test-Team --username test@gmail.com -P ops --orgId 5f4f3c760ed5b166b56b02ce

Team 'test-Team' created.

Copy link
Collaborator

@gssbzn gssbzn left a comment

Choose a reason for hiding this comment

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

Looks great, left a little suggestion to make the usage of the username a bit clearer since this can be a list and not a single user

},
}

cmd.Flags().StringSliceVar(&opts.userNames, flag.Username, []string{}, usage.Username)
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we have a different usage.Username to explain this is a list of members of the team?

Copy link
Collaborator

@gssbzn gssbzn left a comment

Choose a reason for hiding this comment

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

LGTM

@andreaangiolillo andreaangiolillo merged commit 6806c14 into master Sep 2, 2020
@andreaangiolillo andreaangiolillo deleted the CLOUDP-70018 branch September 2, 2020 09:48
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