summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/sharedstorage.php
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-06-04 18:41:47 +0200
committerRobin Appelman <icewind@owncloud.com>2014-06-06 09:56:02 +0200
commit86d7371d0c797d5c97198eebf9152ad748961927 (patch)
tree5145d744eec40d85dbff8b101ec204a772c92855 /apps/files_sharing/lib/sharedstorage.php
parent09970e1816644661d4ad1984793232c880aac1ac (diff)
downloadnextcloud-server-86d7371d0c797d5c97198eebf9152ad748961927.tar.gz
nextcloud-server-86d7371d0c797d5c97198eebf9152ad748961927.zip
fix unshareFromSelf()
Diffstat (limited to 'apps/files_sharing/lib/sharedstorage.php')
-rw-r--r--apps/files_sharing/lib/sharedstorage.php21
1 files changed, 12 insertions, 9 deletions
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index 6b2873302a5..59de2dfa4c4 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -403,15 +403,18 @@ class Shared extends \OC\Files\Storage\Common {
|| $shares
) {
foreach ($shares as $share) {
- $mount = new SharedMount(
- '\OC\Files\Storage\Shared',
- $options['user_dir'] . '/' . $share['file_target'],
- array(
- 'share' => $share,
- ),
- $loader
- );
- $manager->addMount($mount);
+ // don't mount shares where we have no permissions
+ if ($share['permissions'] > 0) {
+ $mount = new SharedMount(
+ '\OC\Files\Storage\Shared',
+ $options['user_dir'] . '/' . $share['file_target'],
+ array(
+ 'share' => $share,
+ ),
+ $loader
+ );
+ $manager->addMount($mount);
+ }
}
}
}