Skip to content

Commit

Permalink
fix: offline viewer in share for anonymous users
Browse files Browse the repository at this point in the history
  • Loading branch information
rivexe committed Mar 12, 2024
1 parent be9dc45 commit a237fd9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions controller/editorapicontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,13 @@ public function config($fileId, $filePath = null, $shareToken = null, $version =
$params["editorConfig"]["callbackUrl"] = $callback;
} else {
$params["editorConfig"]["mode"] = "view";

if (isset($shareToken) && empty($userId)) {
$params["editorConfig"]["coEditing"] = [
"mode" => "strict",
"change" => false
];
}
}

if (\OC::$server->getRequest()->isUserAgent([$this::USER_AGENT_MOBILE])) {
Expand Down

0 comments on commit a237fd9

Please sign in to comment.