summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/sharedstorage.php
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-07-31 11:55:59 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-09-22 17:25:15 +0200
commit89c3b650e6c47899ceea105713b389fe8af78bfa (patch)
treec5c653bcfe7de1f81dc1889636989aade9bc1eae /apps/files_sharing/lib/sharedstorage.php
parent0d37e16499fd0bda83d4c41dfba626b3d9a489f5 (diff)
downloadnextcloud-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.php15
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;
+ }
+
}