Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(CoreQueryBuilder): Use correct member entry for circle as initiator
Before, the member entry that matched the `singleId` of the user and
`level = 9` was used as initiator, which in practice means the member
entry for the internal user circle of the user most of the time.

Instead, we want to use the member entry that matches `singleId` of
the user and `circleId` of the circle in question.

This fixes the wrong `level` being set for `initiator` when calling
`circleProbe()` with `DataProbe::INITIATOR`.

Fixes: #1757

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Nov 25, 2024
commit 68f136372b658ccb33b5e10ded5cb09d890e695c
4 changes: 2 additions & 2 deletions lib/Db/CoreQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1327,8 +1327,8 @@ public function completeProbeWithInitiator(
->leftJoin(
$alias, CoreRequestBuilder::TABLE_MEMBER, $aliasInitiator,
$expr->andX(
$expr->eq($aliasInitiator . '.circle_id', $helperAlias . '.' . $field),
$this->exprLimitInt('level', Member::LEVEL_OWNER, $aliasInitiator)
$expr->eq($aliasInitiator . '.circle_id', $alias . '.unique_id'),
$expr->eq($aliasInitiator . '.' . $field, $helperAlias . '.inheritance_first'),
)
);
//
Expand Down