diff --git a/web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/ExampleData.java b/web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/ExampleData.java index 893719e8..10712df1 100644 --- a/web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/ExampleData.java +++ b/web/documentserver-example/java-spring/src/main/java/com/onlyoffice/integration/ExampleData.java @@ -41,7 +41,8 @@ public class ExampleData { "The file favorite state is undefined", "Can't mention others in comments", "Can't create new files from the editor", - "Can’t see anyone’s information" + "Can’t see anyone’s information", + "Can't rename files from the editor" ); List description_user_1 = List.of( // the description for user 1 "File author by default", diff --git a/web/documentserver-example/java-spring/src/main/resources/templates/editor.html b/web/documentserver-example/java-spring/src/main/resources/templates/editor.html index 48a2c244..7a92b27c 100755 --- a/web/documentserver-example/java-spring/src/main/resources/templates/editor.html +++ b/web/documentserver-example/java-spring/src/main/resources/templates/editor.html @@ -172,7 +172,6 @@ "onRequestInsertImage": onRequestInsertImage, "onRequestCompareFile": onRequestCompareFile, "onRequestMailMergeRecipients": onRequestMailMergeRecipients, - "onRequestRename": onRequestRename, }; var histArray = [[${fileHistory}]]; @@ -210,6 +209,8 @@ var data = JSON.stringify(event.data); innerAlert("onRequestSendNotify: " + data); }; + // prevent file renaming for anonymous users + config.events['onRequestRename'] = onRequestRename; } if (config.editorConfig.createUrl) {