summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-01-29 11:41:28 +0100
committerRoeland Jago Douma <rullzer@owncloud.com>2016-02-02 10:41:57 +0100
commitdf690cd1f2c3d49d52a0b70fdf04f386718ddb28 (patch)
tree82b716cfbce3e78f6426b4febdca0ea1e8358c4a /lib
parent403547f0ea9f34b82fa0ea5e9d7ebc1144ffa0e7 (diff)
downloadnextcloud-server-df690cd1f2c3d49d52a0b70fdf04f386718ddb28.tar.gz
nextcloud-server-df690cd1f2c3d49d52a0b70fdf04f386718ddb28.zip
getChildren should not return usergroup shares
Diffstat (limited to 'lib')
-rw-r--r--lib/private/share20/defaultshareprovider.php12
-rw-r--r--lib/private/share20/manager.php1
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/private/share20/defaultshareprovider.php b/lib/private/share20/defaultshareprovider.php
index 261ba5d4884..ed9c03020b6 100644
--- a/lib/private/share20/defaultshareprovider.php
+++ b/lib/private/share20/defaultshareprovider.php
@@ -251,6 +251,7 @@ class DefaultShareProvider implements IShareProvider {
/**
* Get all children of this share
+ * FIXME: remove once https://github.com/owncloud/core/pull/21660 is in
*
* @param \OCP\Share\IShare $parent
* @return IShare[]
@@ -265,12 +266,11 @@ class DefaultShareProvider implements IShareProvider {
->andWhere(
$qb->expr()->in(
'share_type',
- [
- $qb->expr()->literal(\OCP\Share::SHARE_TYPE_USER),
- $qb->expr()->literal(\OCP\Share::SHARE_TYPE_GROUP),
- $qb->expr()->literal(\OCP\Share::SHARE_TYPE_LINK),
- $qb->expr()->literal(self::SHARE_TYPE_USERGROUP),
- ]
+ $qb->createNamedParameter([
+ \OCP\Share::SHARE_TYPE_USER,
+ \OCP\Share::SHARE_TYPE_GROUP,
+ \OCP\Share::SHARE_TYPE_LINK,
+ ], IQueryBuilder::PARAM_INT_ARRAY)
)
)
->orderBy('id');
diff --git a/lib/private/share20/manager.php b/lib/private/share20/manager.php
index 3c65f67e486..3c5bd197ae8 100644
--- a/lib/private/share20/manager.php
+++ b/lib/private/share20/manager.php
@@ -612,6 +612,7 @@ class Manager implements IManager {
/**
* Delete all the children of this share
+ * FIXME: remove once https://github.com/owncloud/core/pull/21660 is in
*
* @param \OCP\Share\IShare $share
* @return \OCP\Share\IShare[] List of deleted shares