-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Port isTargetAllowed to share 2.0 #26615
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
Conversation
|
@PVince81, thanks for your PR! By analyzing the history of the files in this pull request, we identified @schiessle, @icewind1991 and @rullzer to be potential reviewers. |
10f4199 to
a350674
Compare
|
I could of course modify the test to use a |
a350674 to
9618fb1
Compare
|
Rebased and adjusted test. Please review @jvillafanez @VicDeo |
lib/private/Files/View.php
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we should rename this method (or the one in the Mount class) or not. I got confused with both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could give that one here another name and keep MoveableMount::isTargetAllowed(), might remove confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed to "canMove()" now
lib/private/Share20/Manager.php
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use array_unique or something similar instead?. It might won't happen, but if at some point we get 3 or more providers this will give trouble.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Boo, array_unique only works for strings, PHP tries to convert these to strings.
I'll try and do it differently using provider id as keys
9618fb1 to
4b211a2
Compare
|
Adjusted and squashed. I also added a test for getSharesByPath after realizing that there wasn't one. @jvillafanez rereview ? |
|
Changes look good 👍 |
4b211a2 to
ec780cd
Compare
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
getItemShared()call withShareManager->getSharesByPath()ShareManager->getSharesByPath()by calling the providerRelated Issue
#22209 (comment)
Motivation and Context
Get rid of calls to old share API.
How Has This Been Tested?
TODO: explain
Screenshots (if appropriate):
Types of changes
Checklist:
TODOs
isTargetAllowedto the tests forSharedMount