diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-07-31 11:55:59 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-09-22 17:25:15 +0200 |
commit | 89c3b650e6c47899ceea105713b389fe8af78bfa (patch) | |
tree | c5c653bcfe7de1f81dc1889636989aade9bc1eae /apps/files_sharing/lib/sharedmount.php | |
parent | 0d37e16499fd0bda83d4c41dfba626b3d9a489f5 (diff) | |
download | nextcloud-server-89c3b650e6c47899ceea105713b389fe8af78bfa.tar.gz nextcloud-server-89c3b650e6c47899ceea105713b389fe8af78bfa.zip |
group shares and combine permissions
Diffstat (limited to 'apps/files_sharing/lib/sharedmount.php')
-rw-r--r-- | apps/files_sharing/lib/sharedmount.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/sharedmount.php b/apps/files_sharing/lib/sharedmount.php index 564ac43ec74..9469e0aa48d 100644 --- a/apps/files_sharing/lib/sharedmount.php +++ b/apps/files_sharing/lib/sharedmount.php @@ -121,7 +121,15 @@ class SharedMount extends Mount implements MoveableMount { $relTargetPath = $this->stripUserFilesPath($target); $share = $this->storage->getShare(); - $result = $this->updateFileTarget($relTargetPath, $share); + $result = true; + + if (!empty($share['grouped'])) { + foreach ($share['grouped'] as $s) { + $result = $this->updateFileTarget($relTargetPath, $s) && $result; + } + } else { + $result = $this->updateFileTarget($relTargetPath, $share) && $result; + } if ($result) { $this->setMountPoint($target); @@ -144,8 +152,11 @@ class SharedMount extends Mount implements MoveableMount { */ public function removeMount() { $mountManager = \OC\Files\Filesystem::getMountManager(); + /** + * @var \OC\Files\Storage\Shared + */ $storage = $this->getStorage(); - $result = \OCP\Share::unshareFromSelf($storage->getItemType(), $storage->getMountPoint()); + $result = $storage->unshareStorage(); $mountManager->removeMount($this->mountPoint); return $result; |