summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-02-26 16:05:32 +0100
committerRoeland Jago Douma <rullzer@owncloud.com>2016-02-26 16:05:32 +0100
commitb116e80c5629caab679e158813f1b3fda13cb501 (patch)
tree5008b318097cf35d4d15eb2a0f65911211fb308e /lib
parent5fa6d3ea5802c705c2883edf1d24bbd330defdcb (diff)
downloadnextcloud-server-b116e80c5629caab679e158813f1b3fda13cb501.tar.gz
nextcloud-server-b116e80c5629caab679e158813f1b3fda13cb501.zip
Relax rootfolder check
* Updated unit tests * Added intergration test
Diffstat (limited to 'lib')
-rw-r--r--lib/private/share20/manager.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/share20/manager.php b/lib/private/share20/manager.php
index 6932360a7e9..edcab8ab987 100644
--- a/lib/private/share20/manager.php
+++ b/lib/private/share20/manager.php
@@ -198,7 +198,7 @@ class Manager implements IManager {
}
// And you can't share your rootfolder
- if ($this->rootFolder->getUserFolder($share->getSharedBy())->isSubNode($share->getNode()) === false) {
+ if ($this->rootFolder->getUserFolder($share->getSharedBy())->getPath() === $share->getNode()->getPath()) {
throw new \InvalidArgumentException('You can\'t share your root folder');
}