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

shareAutocompletion feature updated for not listing the user in autocomplete list in webui #35133

Merged
merged 1 commit into from
May 6, 2019
Merged

shareAutocompletion feature updated for not listing the user in autocomplete list in webui #35133

merged 1 commit into from
May 6, 2019

Conversation

haribhandari07
Copy link
Contributor

@haribhandari07 haribhandari07 commented May 2, 2019

Description

ShareAutocompletion feature updated so that the users whose name doesn't contain the text typed in "share-with-field" is not listed in autocomplete list in webUI.

Related Issue

  • Fixes <issue_link>

Motivation and Context

testing of medial search on group and user #34659

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

@codecov
Copy link

codecov bot commented May 2, 2019

Codecov Report

Merging #35133 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #35133      +/-   ##
============================================
- Coverage     65.47%   65.47%   -0.01%     
  Complexity    18635    18635              
============================================
  Files          1217     1217              
  Lines         70543    70543              
  Branches       1296     1296              
============================================
- Hits          46191    46190       -1     
- Misses        23975    23976       +1     
  Partials        377      377
Flag Coverage Δ Complexity Δ
#javascript 53.5% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.86% <ø> (-0.01%) 18635 <ø> (ø)
Impacted Files Coverage Δ Complexity Δ
lib/private/Server.php 86.56% <0%> (-0.12%) 253% <0%> (ø)

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 e798673...356af6a. Read the comment docs.

@codecov
Copy link

codecov bot commented May 2, 2019

Codecov Report

Merging #35133 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #35133      +/-   ##
============================================
+ Coverage     65.48%   65.49%   +<.01%     
  Complexity    18636    18636              
============================================
  Files          1217     1217              
  Lines         70536    70536              
  Branches       1296     1296              
============================================
+ Hits          46191    46195       +4     
+ Misses        23968    23964       -4     
  Partials        377      377
Flag Coverage Δ Complexity Δ
#javascript 53.5% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.87% <ø> (ø) 18636 <ø> (ø) ⬇️
Impacted Files Coverage Δ Complexity Δ
lib/private/Server.php 86.68% <0%> (+0.11%) 253% <0%> (ø) ⬇️
lib/private/Files/Storage/DAV.php 81.09% <0%> (+0.63%) 0% <0%> (ø) ⬇️

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 45e8578...3fc0aa1. Read the comment docs.

And the user "Four" should not be listed in the autocomplete list on the webUI

@skipOnLDAP
Scenario: autocompletion of already existing user
Copy link
Member

Choose a reason for hiding this comment

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

more explanation please

And the user "Four" should not be listed in the autocomplete list on the webUI

@skipOnLDAP
Scenario: autocompletion of already existing user
Copy link
Member

Choose a reason for hiding this comment

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

need more explanation, what is the difference to the last scenario

Copy link
Member

@paurakhsharma paurakhsharma 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.
Some small changes needed.

public function theUserShouldNotBeListedInTheAutocompleteListOnTheWebui($username) {
$names = $this->sharingDialog->getAutocompleteItemsList();
if (\in_array($username, $names)) {
throw new Exception("$username should not be present in the autocomplete items list");
Copy link
Member

Choose a reason for hiding this comment

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

Error message should tell what the current state is, not what needs to be.
Below is just a basic suggestion, needs to be improved.

Suggested change
throw new Exception("$username should not be present in the autocomplete items list");
throw new Exception("$username was found in the autocomplete items list, but was not expected.");

@haribhandari07 haribhandari07 changed the title shareAutocompletion feature updated for the user to be not listed in … shareAutocompletion feature updated for not listing the user in autocomplete list in webui May 2, 2019
@haribhandari07
Copy link
Contributor Author

@skshetry @paurakhsharma @phil-davis can you please provide review?

Copy link
Member

@paurakhsharma paurakhsharma 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 to me. @skshetry @dpakach Please have a look.

Copy link
Contributor

@dpakach dpakach left a comment

Choose a reason for hiding this comment

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

LGTM 👍

And user "Four" should not be listed in the autocomplete list on the webUI

@skipOnLDAP
Scenario: autocompletion of a pattern where the name of existing users contain the pattern somewhere in the last
Copy link
Member

Choose a reason for hiding this comment

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

s/somewhere in the last/at the end

@haribhandari07
Copy link
Contributor Author

backport on #35152

@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants