Skip to content

fix(User Management): add examples#80

Merged
padamstx merged 5 commits intomainfrom
um-examples
Feb 25, 2021
Merged

fix(User Management): add examples#80
padamstx merged 5 commits intomainfrom
um-examples

Conversation

@pyrooka
Copy link
Copy Markdown
Member

@pyrooka pyrooka commented Feb 24, 2021

PR summary

This PR adds examples to the User Management service and move hard-coded config values to the env file.

PR Checklist

Please make sure that your PR fulfills the following requirements:

  • The commit message follows the Angular Commit Message Guidelines.
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Current vs new behavior

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pyrooka pyrooka requested a review from padamstx February 24, 2021 20:34
Copy link
Copy Markdown
Contributor

@padamstx padamstx left a comment

Choose a reason for hiding this comment

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

Looks good... just suggested changes to use the various "addXXX" methods on the builders where applicable.

Attribute[] attributeArray = new Attribute[] { attributeModel, attributeModel2 };

Resource resourceModel = new Resource.Builder()
.attributes(new java.util.ArrayList<Attribute>(java.util.Arrays.asList(attributeArray)))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
.attributes(new java.util.ArrayList<Attribute>(java.util.Arrays.asList(attributeArray)))
.addAttributes(attributeModel)
.addAttributes(attributeModel2)


InviteUserIamPolicy inviteUserIamPolicyModel = new InviteUserIamPolicy.Builder()
.type("access")
.roles(new java.util.ArrayList<Role>(java.util.Arrays.asList(roleModel)))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
.roles(new java.util.ArrayList<Role>(java.util.Arrays.asList(roleModel)))
.addRoles(roleModel)

InviteUserIamPolicy inviteUserIamPolicyModel = new InviteUserIamPolicy.Builder()
.type("access")
.roles(new java.util.ArrayList<Role>(java.util.Arrays.asList(roleModel)))
.resources(new java.util.ArrayList<Resource>(java.util.Arrays.asList(resourceModel)))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
.resources(new java.util.ArrayList<Resource>(java.util.Arrays.asList(resourceModel)))
.addResources(resourceModel)


InviteUsersOptions inviteUsersOptions = new InviteUsersOptions.Builder()
.accountId(accountId)
.users(new java.util.ArrayList<InviteUser>(java.util.Arrays.asList(inviteUserModel)))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
.users(new java.util.ArrayList<InviteUser>(java.util.Arrays.asList(inviteUserModel)))
.addUsers(inviteUserModel)

InviteUsersOptions inviteUsersOptions = new InviteUsersOptions.Builder()
.accountId(accountId)
.users(new java.util.ArrayList<InviteUser>(java.util.Arrays.asList(inviteUserModel)))
.iamPolicy(new java.util.ArrayList<InviteUserIamPolicy>(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
.iamPolicy(new java.util.ArrayList<InviteUserIamPolicy>(
.addIamPolicy(inviteUserIamPolicyModel)

.accountId(accountId)
.users(new java.util.ArrayList<InviteUser>(java.util.Arrays.asList(inviteUserModel)))
.iamPolicy(new java.util.ArrayList<InviteUserIamPolicy>(
java.util.Arrays.asList(inviteUserIamPolicyModel)))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
java.util.Arrays.asList(inviteUserIamPolicyModel)))

.users(new java.util.ArrayList<InviteUser>(java.util.Arrays.asList(inviteUserModel)))
.iamPolicy(new java.util.ArrayList<InviteUserIamPolicy>(
java.util.Arrays.asList(inviteUserIamPolicyModel)))
.accessGroups(new java.util.ArrayList<String>(java.util.Arrays.asList(accessGroupId)))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
.accessGroups(new java.util.ArrayList<String>(java.util.Arrays.asList(accessGroupId)))
.addAccessGroups(accessGroupId)

Copy link
Copy Markdown
Contributor

@padamstx padamstx left a comment

Choose a reason for hiding this comment

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

LGTM

@padamstx padamstx merged commit 2c152fb into main Feb 25, 2021
@padamstx padamstx deleted the um-examples branch February 25, 2021 12:01
ibm-devx-automation pushed a commit that referenced this pull request Feb 25, 2021
## [0.17.11](0.17.10...0.17.11) (2021-02-25)

### Bug Fixes

* **User Management:** add examples ([#80](#80)) ([2c152fb](2c152fb))
@ibm-devx-automation
Copy link
Copy Markdown

🎉 This PR is included in version 0.17.11 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

JonahFarc pushed a commit to JonahFarc/platform-services-java-sdk that referenced this pull request Sep 15, 2021
JonahFarc pushed a commit to JonahFarc/platform-services-java-sdk that referenced this pull request Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants