[10.11] Show users only once when repeated for batch sharing#40347
Merged
phil-davis merged 1 commit intorelease-10.11.0from Sep 8, 2022
Merged
[10.11] Show users only once when repeated for batch sharing#40347phil-davis merged 1 commit intorelease-10.11.0from
phil-davis merged 1 commit intorelease-10.11.0from
Conversation
f9a9854 to
21d3ec9
Compare
11 tasks
|
Kudos, SonarCloud Quality Gate passed! |
JammingBen
approved these changes
Sep 8, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.








Description
If users for batch sharing are listed in a comma-separated list with varying amounts of white-space after the commas, then the usernames can be repeated in the suggested list to add - even though they are the same user.
Enter:
brian,carol, brian, caroland all 4 "users" are suggested.This PR fixes the problem by removing and white-space after commas in the list of users, before splitting the list into and array.
Note: the fixes only does this when generating the list of unique users. This must not be done generally to the string before this point, because group names can have white-space in them. For example, we still need to be able to share with a group called
brian, carol! And a different group calledbrian,carol! So space matters for group names.Related Issue
How Has This Been Tested?
I manually tried some combinations with 2 users like
bbbbandccccand having groups calledbbbb,ccccandbbbb, cccc. I can share with the 2 users, or either group (depending on if I type the space or not after the comma)Types of changes
Checklist: