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/sharedstorage.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/sharedstorage.php')
-rw-r--r-- | apps/files_sharing/lib/sharedstorage.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index 07f6b9da10c..a6799ddd369 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -532,4 +532,19 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage { return null; } + /** + * unshare complete storage, also the grouped shares + */ + public function unshareStorage() { + $result = true; + if (!empty($this->share['grouped'])) { + foreach ($this->share['grouped'] as $share) { + $result = $result && \OCP\Share::unshareFromSelf($share['item_type'], $share['file_target']); + } + } + $result = $result && \OCP\Share::unshareFromSelf($this->getItemType(), $this->getMountPoint()); + + return $result; + } + } |