From 110922db509e29dc4ceefc31b574d8157af6e72a Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Thu, 29 Apr 2021 11:19:31 -0100 Subject: [PATCH 1/2] enforce forcaAll Signed-off-by: Maxence Lange --- lib/Service/CirclesService.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Service/CirclesService.php b/lib/Service/CirclesService.php index f55ca1af0..4ddbf5a2a 100644 --- a/lib/Service/CirclesService.php +++ b/lib/Service/CirclesService.php @@ -280,10 +280,9 @@ public function detailsCircle($circleUniqueId, $forceAll = false) { } else { $circle = $this->circlesRequest->getCircleFromUniqueId($circleUniqueId); } - if ($this->viewerIsAdmin() + if ($forceAll === true || $this->viewerIsAdmin() || $circle->getHigherViewer() ->isLevel(Member::LEVEL_MEMBER) - || $forceAll === true ) { $this->detailsCircleMembers($circle); $this->detailsCircleLinkedGroups($circle); From fe26f56c6f061efe0778f70f501efbf395e44f28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 3 May 2021 07:40:13 +0200 Subject: [PATCH 2/2] Pass forceAll also when fetching the members list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Service/CirclesService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Service/CirclesService.php b/lib/Service/CirclesService.php index 4ddbf5a2a..b4b29601d 100644 --- a/lib/Service/CirclesService.php +++ b/lib/Service/CirclesService.php @@ -284,7 +284,7 @@ public function detailsCircle($circleUniqueId, $forceAll = false) { || $circle->getHigherViewer() ->isLevel(Member::LEVEL_MEMBER) ) { - $this->detailsCircleMembers($circle); + $this->detailsCircleMembers($circle, $forceAll); $this->detailsCircleLinkedGroups($circle); $this->detailsCircleFederatedCircles($circle); } @@ -303,8 +303,8 @@ public function detailsCircle($circleUniqueId, $forceAll = false) { * * @throws Exception */ - private function detailsCircleMembers(Circle $circle) { - if ($this->viewerIsAdmin()) { + private function detailsCircleMembers(Circle $circle, $forceAll = false) { + if ($forceAll || $this->viewerIsAdmin()) { $members = $this->membersRequest->forceGetMembers($circle->getUniqueId(), 0); } else { $members = $this->membersRequest->getMembers(