Merge pull request #5343 from nextcloud/share-filter-missing-groups
filter missing groups in share provider
This commit is contained in:
commit
c46422b780
|
@ -74,7 +74,7 @@ class Manager extends PublicEmitter implements IGroupManager {
|
||||||
private $cachedGroups = array();
|
private $cachedGroups = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \OC\Group\Group[]
|
* @var \OC\Group\Group[][]
|
||||||
*/
|
*/
|
||||||
private $cachedUserGroups = array();
|
private $cachedUserGroups = array();
|
||||||
|
|
||||||
|
|
|
@ -743,6 +743,8 @@ class DefaultShareProvider implements IShareProvider {
|
||||||
$qb->andWhere($qb->expr()->eq('file_source', $qb->createNamedParameter($node->getId())));
|
$qb->andWhere($qb->expr()->eq('file_source', $qb->createNamedParameter($node->getId())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$groups = array_filter($groups, function($group) { return $group instanceof IGroup; });
|
||||||
$groups = array_map(function(IGroup $group) { return $group->getGID(); }, $groups);
|
$groups = array_map(function(IGroup $group) { return $group->getGID(); }, $groups);
|
||||||
|
|
||||||
$qb->andWhere($qb->expr()->eq('share_type', $qb->createNamedParameter(\OCP\Share::SHARE_TYPE_GROUP)))
|
$qb->andWhere($qb->expr()->eq('share_type', $qb->createNamedParameter(\OCP\Share::SHARE_TYPE_GROUP)))
|
||||||
|
|
Loading…
Reference in New Issue