Merge pull request #3664 from nextcloud/backport/stable23/2496

[stable23] Transfer ownership
This commit is contained in:
Julius Härtl
2022-04-11 18:29:14 +02:00
committed by GitHub
27 changed files with 1863 additions and 1074 deletions

View File

@@ -243,6 +243,7 @@ class PermissionService {
if (array_key_exists((string) $boardId, $this->users) && !$refresh) {
return $this->users[(string) $boardId];
}
try {
$board = $this->boardMapper->find($boardId);
} catch (DoesNotExistException $e) {
@@ -334,4 +335,13 @@ class PermissionService {
}
return $groups;
}
/**
* Set a different user than the current one, e.g. when no user is available in occ
*
* @param string $userId
*/
public function setUserId(string $userId): void {
$this->userId = $userId;
}
}