Skip to content

Commit

Permalink
Merge pull request #582 from nextcloud/backport/577/stable20
Browse files Browse the repository at this point in the history
[stable20] enforce forceAll
  • Loading branch information
ArtificialOwl authored May 4, 2021
2 parents 80ba7d9 + fe26f56 commit 82c5eba
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/Service/CirclesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,11 @@ 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->detailsCircleMembers($circle, $forceAll);
$this->detailsCircleLinkedGroups($circle);
$this->detailsCircleFederatedCircles($circle);
}
Expand All @@ -304,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(
Expand Down

0 comments on commit 82c5eba

Please sign in to comment.