diff --git a/lib/Service/PermissionService.php b/lib/Service/PermissionService.php index 2a815fe01..05a4e6939 100644 --- a/lib/Service/PermissionService.php +++ b/lib/Service/PermissionService.php @@ -262,6 +262,26 @@ class PermissionService { $users[$user->getUID()] = new User($user); } } + + if ($this->circlesEnabled && $acl->getType() === Acl::PERMISSION_TYPE_CIRCLE) { + try { + $circle = \OCA\Circles\Api\v1\Circles::detailsCircle($acl->getParticipant(), true); + if ($circle === null) { + $this->logger->info('No circle found for acl rule ' . $acl->getId()); + continue; + } + + /* $b = $circle->getMember(); + + foreach ($circle['members'] as $user) { + $a = $user; + //$users[$user->userId()] = new User($user); + } */ + + } catch (\Exception $e) { + $this->logger->info('Member not found in circle that was accessed. This should not happen.'); + } + } } $this->users[(string) $boardId] = $users; return $this->users[(string) $boardId];