-
Notifications
You must be signed in to change notification settings - Fork 2.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
[stable6 backport] Permit personal mount points to be used for sharing #9635
Conversation
An issue existed where `readData` used `OCP\User::getUser()` to get the user for personal mount points, which worked in all situations apart from when a personal mount point was used for sharing, so the return from `getUser()` is not the user that owns the share. As such, any personal mount points would not work correctly when shared. `readData` and `writeData` have been changed from using a `$isPersonal` boolean to using a `$user` string|null. `$isPersonal = false` can now be written as `$user = NULL` (or left out in the case of `readData`), and `$isPersonal = true` can be written as `$user = OCP\User::getUser()`. Backport of abfd7ec from master
Please review @Xenopathic @DeepDiver1975 @icewind1991 @karlitschek @craigpg need your approval for this backport. |
Code looks good 👍 |
The inspection completed: No issues found |
👍 (although I wrote it, does it still count? 😆) |
Yes, as sanity check. Or you can help test it. Not 100% the same: getBackendStatus does not have the isPersonal arg, but should be fine. |
Hmm, I see. I don't think |
Yeah, not sure why that argument was added on master. Waiting for @karlitschek 's green light as this is OC6, then we can merge. |
yes. please backport |
You mean merge 😄 Merging now. |
…dData [stable6 backport] Permit personal mount points to be used for sharing
An issue existed where
readData
usedOCP\User::getUser()
to get the userfor personal mount points, which worked in all situations apart from when a
personal mount point was used for sharing, so the return from
getUser()
isnot the user that owns the share. As such, any personal mount points would not
work correctly when shared.
readData
andwriteData
have been changed from using a$isPersonal
boolean to using a
$user
string|null.$isPersonal = false
can now bewritten as
$user = NULL
(or left out in the case ofreadData
), and$isPersonal = true
can be written as$user = OCP\User::getUser()
.Backport of abfd7ec from master
Fixes #9535