Skip to content

Commit

Permalink
Set IUserSession user in SessionController if available
Browse files Browse the repository at this point in the history
fixes #2821

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
  • Loading branch information
marcelklehr authored and backportbot-nextcloud[bot] committed Nov 9, 2022
1 parent 3bb952b commit ecf3215
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Controller/SessionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\Response;
use OCP\IRequest;
use OCP\IUserManager;
use OCP\IUserSession;

class SessionController extends Controller {

Expand Down Expand Up @@ -71,6 +73,7 @@ public function close(int $documentId, int $sessionId, string $sessionToken): Da
* @PublicPage
*/
public function push(int $documentId, int $sessionId, string $sessionToken, int $version, array $steps): DataResponse {
$this->loginSessionUser($documentId, $sessionId, $sessionToken);
return $this->apiService->push($documentId, $sessionId, $sessionToken, $version, $steps);
}

Expand All @@ -79,6 +82,7 @@ public function push(int $documentId, int $sessionId, string $sessionToken, int
* @PublicPage
*/
public function sync(int $documentId, int $sessionId, string $sessionToken, int $version = 0, string $autosaveContent = null, bool $force = false, bool $manualSave = false): DataResponse {
$this->loginSessionUser($documentId, $sessionId, $sessionToken);
return $this->apiService->sync($documentId, $sessionId, $sessionToken, $version, $autosaveContent, $force, $manualSave);
}
}

0 comments on commit ecf3215

Please sign in to comment.