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(portal): new addGroupUsers() function #585

Merged
merged 4 commits into from
Jun 17, 2019
Merged

feat(portal): new addGroupUsers() function #585

merged 4 commits into from
Jun 17, 2019

Conversation

haoliangyu
Copy link
Member

resolve #584

AFFECTS PACKAGES:
@esri/arcgis-rest-portal

ISSUES CLOSED: #584
@codecov
Copy link

codecov bot commented Jun 17, 2019

Codecov Report

Merging #585 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #585   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          93     95    +2     
  Lines        1366   1407   +41     
  Branches      245    248    +3     
=====================================
+ Hits         1366   1407   +41
Impacted Files Coverage Δ
...ackages/arcgis-rest-portal/src/groups/add-users.ts 100% <100%> (ø)
packages/arcgis-rest-portal/src/util/array.ts 100% <100%> (ø)
packages/arcgis-rest-portal/src/index.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cd39c5b...5acf7db. Read the comment docs.

@haoliangyu haoliangyu marked this pull request as ready for review June 17, 2019 19:46
Copy link
Member

@tomwayson tomwayson left a comment

Choose a reason for hiding this comment

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

This looks great @haoliangyu!

One small change.

return request(url, requestOptions).catch(error => {
return {
// the request should either add users or admins, not both
notAdded: requestOptions.users || requestOptions.admins,
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should populate notAdded when there are errors. We don't want them to get mixed up w/ any that were not added b/c they were already in the group.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have updated the code

@tomwayson tomwayson merged commit 5fb2509 into Esri:master Jun 17, 2019
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.

Add functions to add users/admins to a group
2 participants