-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Update owner of subdir on move into/out of share #31728
Conversation
dd5f8ce
to
ab7771b
Compare
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.
The "moving out of share" scenario is not taken into account as we exit early here: Updater.php:88
Handled in 7ae7ce6
Done. Test checks for the following for both a file and a folder:
|
continue; | ||
} | ||
|
||
if ($dstMount instanceof \OCA\Files_Sharing\SharedMount) { | ||
if (!($dstMount->getShare()->getPermissions() & Constants::PERMISSION_SHARE)) { |
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.
So, if the destination is a share and does not have the SHARE
permission, we delete the current share?
Not sure about the rational.
0975680
to
7f43c94
Compare
@artonge I only realized late that you were also working on this. In parallel I wrote two integration tests. |
71406c6
to
8a1d8f5
Compare
With S3 bucket as primary storage, when moving a share out from a share, the
Issue: #31870 The failing test has been disabled, and will be re-enabled when the new issue is fixed |
This comment was marked as resolved.
This comment was marked as resolved.
It's about the implementation of |
Ah, so we are having a breaking change here. Then it also would need to be documented in #32117 Ideally it would work without breaking the APi (via deprecations), but probably that's not feasible? |
A new `$shallow` argument was introduced to `IShareProvider::getSharesInFolder` in NC25 by nextcloud/server#31728. This PR adds this new argument and the necessary changes to make it work based on this example https://github.com/nextcloud/server/pull/31728/files#diff-dee1351696d7eae959761edf66c8e5a9052e28be73319733d857a9ab2d9fc967= Signed-off-by: Louis Chemineau <louis@chmn.me>
A new `$shallow` argument was introduced to `IShareProvider::getSharesInFolder` in NC25 by nextcloud/server#31728. This PR adds this new argument and the necessary changes to make it work based on this example https://github.com/nextcloud/server/pull/31728/files#diff-dee1351696d7eae959761edf66c8e5a9052e28be73319733d857a9ab2d9fc967= Signed-off-by: Louis Chemineau <louis@chmn.me>
/rebase |
Signed-off-by: Louis Chemineau <louis@chmn.me>
When moving a directory into or out of a received share, make sure to also update the share owner column for shares that exist insie the directory. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: Louis Chemineau <louis@chmn.me>
Added tests to verify share owner change when moving the parent of a subshare in and out of a received share. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: Louis Chemineau <louis@chmn.me>
Signed-off-by: Louis Chemineau <louis@chmn.me>
55fa748
to
f525067
Compare
CI failure unrelated (videoverification is fixed by nextcloud/spreed#7648) |
I noticed that this breaks circle due to the API break in the interface :( |
A new `$shallow` argument was introduced to `IShareProvider::getSharesInFolder` in NC25 by nextcloud/server#31728. This PR adds this new argument and the necessary changes to make it work based on this example https://github.com/nextcloud/server/pull/31728/files#diff-dee1351696d7eae959761edf66c8e5a9052e28be73319733d857a9ab2d9fc967= Signed-off-by: Louis Chemineau <louis@chmn.me>
A new `$shallow` argument was introduced to `IShareProvider::getSharesInFolder` in NC25 by nextcloud/server#31728. This PR adds this new argument and the necessary changes to make it work based on this example https://github.com/nextcloud/server/pull/31728/files#diff-dee1351696d7eae959761edf66c8e5a9052e28be73319733d857a9ab2d9fc967= Signed-off-by: Louis Chemineau <louis@chmn.me>
A new `$shallow` argument was introduced to `IShareProvider::getSharesInFolder` in NC25 by nextcloud/server#31728. This PR adds this new argument and the necessary changes to make it work based on this example https://github.com/nextcloud/server/pull/31728/files#diff-dee1351696d7eae959761edf66c8e5a9052e28be73319733d857a9ab2d9fc967= Signed-off-by: Louis Chemineau <louis@chmn.me>
A new `$shallow` argument was introduced to `IShareProvider::getSharesInFolder` in NC25 by nextcloud/server#31728. This PR adds this new argument and the necessary changes to make it work based on this example https://github.com/nextcloud/server/pull/31728/files#diff-dee1351696d7eae959761edf66c8e5a9052e28be73319733d857a9ab2d9fc967= Signed-off-by: Louis Chemineau <louis@chmn.me>
A new `$shallow` argument was introduced to `IShareProvider::getSharesInFolder` in NC25 by nextcloud/server#31728. This PR adds this new argument and the necessary changes to make it work based on this example https://github.com/nextcloud/server/pull/31728/files#diff-dee1351696d7eae959761edf66c8e5a9052e28be73319733d857a9ab2d9fc967= Signed-off-by: Louis Chemineau <louis@chmn.me>
When moving a directory into or out of a received share, make sure to
also update the share owner column for shares that exist insie the
directory.
Fixes #30791
All the three scenarios listed there are fixed.