Skip to content

Commit

Permalink
Merge pull request #659 from nextcloud/backport/651/stable22
Browse files Browse the repository at this point in the history
[stable22] filter personal on canBeVisitor
  • Loading branch information
ArtificialOwl authored Jun 28, 2021
2 parents fc56652 + afa0f43 commit 90a317f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lib/Db/CoreQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1218,14 +1218,7 @@ protected function limitInitiatorVisibility(string $alias): ICompositeExpression
}
if ($this->getBool('canBeVisitor', $options, false)) {
// TODO: should find a better way, also filter on remote initiator on non-federated ?
$andXVisitor = $expr->andX();
$andXVisitor->add($expr->gte($alias . '.config', $this->createNamedParameter(0)));
if ($filterPersonalCircle) {
$andXVisitor->add(
$this->exprFilterBitwise('config', Circle::CFG_PERSONAL, $aliasMembershipCircle)
);
}
$orX->add($andXVisitor);
$orX->add($this->exprFilterInt('config', Circle::CFG_PERSONAL, $alias));
}
if ($this->getBool('canBeVisitorOnOpen', $options, false)) {
$andOpen = $expr->andX();
Expand Down

0 comments on commit 90a317f

Please sign in to comment.