From e7fcef3e3a989fcdf19dd4c070dfdbc4f438666c Mon Sep 17 00:00:00 2001 From: Jakob Date: Tue, 15 Oct 2019 08:30:25 +0200 Subject: [PATCH] circle sharing Signed-off-by: Jakob --- lib/Service/PermissionService.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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];