Merge branch 'develop' into refactor/php-example-refactoring

This commit is contained in:
rivexe
2023-03-02 14:10:32 +03:00
68 changed files with 1556 additions and 51 deletions

View File

@ -32,6 +32,7 @@ use function OnlineEditorsExamplePhp\getStoragePath;
use function OnlineEditorsExamplePhp\getTemplateImageUrl;
use function OnlineEditorsExamplePhp\serverPath;
use function OnlineEditorsExamplePhp\tryGetDefaultByType;
use function OnlineEditorsExamplePhp\getCurUserHostAddress;
final class DocEditorView extends View
{
@ -133,6 +134,14 @@ final class DocEditorView extends View
"reviewGroups" => $user->reviewGroups,
"commentGroups" => $user->commentGroups,
"userInfoGroups" => $user->userInfoGroups,
"protect" => !in_array("protect", $user->deniedPermissions),
],
"referenceData" => [
"fileKey" => $user->id != "uid-0" ? json_encode([
"fileName" => $filename,
"userAddress" => getCurUserHostAddress()
]) : null,
"instanceId" => serverPath(),
],
],
"editorConfig" => [