Skip to content

Commit c6b678f

Browse files
ArtificialOwlbackportbot[bot]
authored andcommitted
fix permissions update
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
1 parent 88b0af1 commit c6b678f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

lib/ShareByCircleProvider.php

+11-1
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,19 @@ public function create(IShare $share): IShare {
249249
* @param IShare $share
250250
*
251251
* @return IShare
252+
* @throws IllegalIDChangeException
253+
* @throws ShareWrapperNotFoundException
254+
* @throws RequestBuilderException
252255
*/
253256
public function update(IShare $share): IShare {
254-
return $share;
257+
$wrappedShare = $this->shareWrapperService->getShareById((int)$share->getId());
258+
$wrappedShare->setPermissions($share->getPermissions())
259+
->setShareOwner($share->getShareOwner())
260+
->setSharedBy($share->getSharedBy());
261+
262+
$this->shareWrapperService->update($wrappedShare);
263+
264+
return $wrappedShare->getShare($this->rootFolder, $this->userManager, $this->urlGenerator);
255265
}
256266

257267
/**

0 commit comments

Comments
 (0)