diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-06-04 18:41:47 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-06-06 09:56:02 +0200 |
commit | 86d7371d0c797d5c97198eebf9152ad748961927 (patch) | |
tree | 5145d744eec40d85dbff8b101ec204a772c92855 /apps/files_sharing/lib/sharedstorage.php | |
parent | 09970e1816644661d4ad1984793232c880aac1ac (diff) | |
download | nextcloud-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.php | 21 |
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); + } } } } |