Skip to content

Commit

Permalink
Merge pull request #469 from ONLYOFFICE/hotfix/disable-share-coeditin…
Browse files Browse the repository at this point in the history
…g-for-anonymous

fix: offline viewer in share for anonymous users
  • Loading branch information
LinneyS authored Mar 12, 2024
2 parents be9dc45 + a237fd9 commit d04cc91
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 d04cc91

Please sign in to comment.