Skip to content

Commit

Permalink
fix call to deprecated circles api
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
  • Loading branch information
ArtificialOwl committed Nov 8, 2022
1 parent 175ac79 commit 8298f50
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions apps/files_sharing/lib/Controller/ShareAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1797,12 +1797,12 @@ private function shareProviderResharingRights(string $userId, IShare $share, $no
$sharedWith = substr($share->getSharedWith(), $shareWithStart, $shareWithLength);
}
try {
$member = \OCA\Circles\Api\v1\Circles::getMember($sharedWith, $userId, 1);
if ($member->getLevel() >= 4) {
return true;
}
return false;
} catch (QueryException $e) {
// checking if user is within said circle
// deprecated API, needs to be edited when ICirclesManager is implemented
\OCA\Circles\Api\v1\Circles::getMember($sharedWith, $userId, 1);

return true;
} catch (\Exception $e) {
return false;
}
}
Expand Down

0 comments on commit 8298f50

Please sign in to comment.