diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-11-10 13:08:45 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-11-21 16:17:37 +0100 |
commit | a7ebfe87c9ef16c698c16c4f72eaf3865825c540 (patch) | |
tree | f0101d948b458e067b479de0019eba55c5b82c25 /apps | |
parent | 13b06aa6dfeb7c63750461529b27494ed035707d (diff) | |
download | nextcloud-server-a7ebfe87c9ef16c698c16c4f72eaf3865825c540.tar.gz nextcloud-server-a7ebfe87c9ef16c698c16c4f72eaf3865825c540.zip |
also check for the correct owner if it was submitted
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/share/folder.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/share/folder.php b/apps/files_sharing/lib/share/folder.php index 2671f5738b7..f86e9624432 100644 --- a/apps/files_sharing/lib/share/folder.php +++ b/apps/files_sharing/lib/share/folder.php @@ -26,13 +26,14 @@ class OC_Share_Backend_Folder extends OC_Share_Backend_File implements OCP\Share * * @param int $itemSource item source ID * @param string $shareWith with whom should the item be shared + * @param string $owner owner of the item * @return array with shares */ - public function getParents($itemSource, $shareWith = null) { + public function getParents($itemSource, $shareWith = null, $owner = null) { $result = array(); $parent = $this->getParentId($itemSource); while ($parent) { - $shares = \OCP\Share::getItemSharedWithUser('folder', $parent, $shareWith); + $shares = \OCP\Share::getItemSharedWithUser('folder', $parent, $shareWith, $owner); if ($shares) { foreach ($shares as $share) { $name = substr($share['path'], strrpos($share['path'], '/') + 1); |