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

[stable6 backport] Permit personal mount points to be used for sharing #9635

Merged
merged 1 commit into from
Jul 15, 2014

Conversation

PVince81
Copy link
Contributor

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

Fixes #9535

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
@PVince81
Copy link
Contributor Author

Please review @Xenopathic @DeepDiver1975 @icewind1991

@karlitschek @craigpg need your approval for this backport.

@PVince81 PVince81 added this to the ownCloud 6.0.5 milestone Jul 15, 2014
@icewind1991
Copy link
Contributor

Code looks good 👍

@scrutinizer-notifier
Copy link

The inspection completed: No issues found

@RobinMcCorkell
Copy link
Member

👍 (although I wrote it, does it still count? 😆)

@PVince81
Copy link
Contributor Author

Yes, as sanity check. Or you can help test it.
There were conflicts I had to solve.

Not 100% the same: getBackendStatus does not have the isPersonal arg, but should be fine.

@RobinMcCorkell
Copy link
Member

Hmm, I see. I don't think getBackendStatus should ever be used when mounting other users' shares.

@PVince81
Copy link
Contributor Author

Yeah, not sure why that argument was added on master.
Anyway, @grapefruitpower reported that it fixed the issue.

Waiting for @karlitschek 's green light as this is OC6, then we can merge.

@karlitschek
Copy link
Contributor

yes. please backport

@PVince81
Copy link
Contributor Author

You mean merge 😄

Merging now.

PVince81 pushed a commit that referenced this pull request Jul 15, 2014
…dData

[stable6 backport] Permit personal mount points to be used for sharing
@PVince81 PVince81 merged commit e4b4c6c into stable6 Jul 15, 2014
@PVince81 PVince81 deleted the stable6-files_external_fix_readData branch July 15, 2014 15:11
@lock lock bot locked as resolved and limited conversation to collaborators Aug 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants