Skip to content

Commit 3f37e9c

Browse files
juliusknorrbackportbot[bot]
authored andcommitted
Allow to get circle details with forceAll even if there is no current user or the user is not a member
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent cb9d950 commit 3f37e9c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/Service/CirclesService.php

+7-3
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,13 @@ public function listCircles($userId, $type, $name = '', $level = 0, $forceAll =
273273
public function detailsCircle($circleUniqueId, $forceAll = false) {
274274

275275
try {
276-
$circle = $this->circlesRequest->getCircle(
277-
$circleUniqueId, $this->userId, Member::TYPE_USER, '', $forceAll
278-
);
276+
if (!$forceAll) {
277+
$circle = $this->circlesRequest->getCircle(
278+
$circleUniqueId, $this->userId, Member::TYPE_USER, '', $forceAll
279+
);
280+
} else {
281+
$circle = $this->circlesRequest->getCircleFromUniqueId($circleUniqueId);
282+
}
279283
if ($this->viewerIsAdmin()
280284
|| $circle->getHigherViewer()
281285
->isLevel(Member::LEVEL_MEMBER)

0 commit comments

Comments
 (0)